Posted August 15, 20223 yr I am trying to find the damage attribute of an item, which I already have a reference too. This is what I have tried. I checked my logs and it says that EntityAttributes is undefined. Is there any import I can add to fix this or just something else I can replace it with? itemstack.getAttributeModifiers(EquipmentSlot.MAINHAND).get(EntityAttributes.GENERIC_ATTACK_DAMAGE) Edited August 16, 20223 yr by clqrified
August 16, 20223 yr You should use Attributes.ATTACK_DAMAGE and not EntityAttributes.GENERIC_ATTACK_DAMAGE 🙂
August 16, 20223 yr Author I have done that and that returned an error, so i imported net.minecraft.world.entity.ai.attributes Now this is also returning the same error, cannot find symbol, specifically .attributes.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.