Iron's Spells 'n Spellbooks

Iron's Spells 'n Spellbooks

24M Downloads

[Bug] Dead King spawns with 1 Spell Power instead of 1.15

SojaIntegral opened this issue ยท 0 comments

commented

Observed behaviour

Dead King mob Spell Power and Spell Resistance are always 1.

Dead King's code for spell power

Even when trying to use mixins to add spell power or spell resistance, all values stay at 1. Just for clarification: this isn't an issue with just my mixins, it's present even in the base ISS mod.

This code adds even Armor Toughness, removes Armor, changes all values for all attributes, but can't change Spell Power or Spell Resistance at all.

package net.potato_modding.potatospells.mixin; import io.redspace.ironsspellbooks.api.registry.AttributeRegistry; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.ai.attributes.AttributeSupplier; import net.minecraft.world.entity.ai.attributes.Attributes; import io.redspace.ironsspellbooks.entity.mobs.dead_king_boss.DeadKingBoss; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; @Mixin(DeadKingBoss.class) public class DeadKingMixin { @Overwrite public static AttributeSupplier.Builder prepareAttributes() { return LivingEntity.createLivingAttributes() .add(Attributes.ATTACK_DAMAGE, 20) .add(AttributeRegistry.SPELL_POWER, 2) .add(Attributes.ARMOR, 20) .add(Attributes.ARMOR_TOUGHNESS, 20) .add(AttributeRegistry.SPELL_RESIST, 5) .add(Attributes.MAX_HEALTH, 100) .add(Attributes.KNOCKBACK_RESISTANCE, .8) .add(Attributes.ATTACK_KNOCKBACK, .6) .add(Attributes.ENTITY_INTERACTION_RANGE, 4) .add(Attributes.FOLLOW_RANGE, 32) .add(Attributes.FLYING_SPEED, .310) .add(Attributes.MOVEMENT_SPEED, .310); } }

Expected behaviour

Expected attributes from AttributesRegistry to increase/decrease as defined in code.

Steps to reproduce

  1. Spawn Dead King
  2. use the command "/attribute @n[type=!player] irons_spellbooks:spell_power get" while near the Dead King
  3. Command returns a value of 1.0 at all times.

Server Type

Single Player

Crashlog

No response

Iron's Spells N Spellbooks version

1.21.1-3.12.1

Forge version

NeoForge 21.1.172

Other mods

NBTAutocomplete and Smart Completion (mods I use in testing to make game commands easier to use)

Crashlog Check

  • I understand if this is a crashbug and I did not attach a crashlog, this will not be handled

Fabric Check

  • I understand if I am using Farbic APIs or Connector, this will not be handled