#AttackDamage not working!!!

12 messages · Page 1 of 1 (latest)

gusty epoch
#

Im new to minecraft modding but I am pretty sure I did everything correct because everything in the Custom ToolMaterial class works but the attack damage doesn't

`public class LuminiteToolMaterial implements ToolMaterial {

@Override
public int getDurability() {
    return 1560;
}

@Override
public float getMiningSpeedMultiplier() {
    return 8.0f;
}

@Override
public float getAttackDamage() {
    return 1444.3f;
}

@Override
public TagKey<Block> getInverseTag() {
    return BlockTags.INCORRECT_FOR_DIAMOND_TOOL;
}

@Override
public int getEnchantability() {
    return 12;
}

@Override
public Ingredient getRepairIngredient() {
    return Ingredient.ofItems(ModItems.LUMINITE_INGOT);
}

public static final LuminiteToolMaterial INSTANCE = new LuminiteToolMaterial();

}`

gusty epoch
#

ping me if someone wants to help

naive solstice
#

@gusty epoch

Can you show where you initialize the tool item?

gusty epoch
#

alr

#

Its in my ModItems class let me send u a screen shot

#

// Tools
public static final Item LUMINITE_SWORD = registerItem
(new SwordItemLuminite_Sword(LuminiteToolMaterial.INSTANCE, new Item.Settings()), "luminite_sword");

naive solstice
#

Yeah. Not sure what version you’re modding for, but the newer versions ( 1.21.1+)

Need some more stuff on the item settings. Open Minecraft items file and go look at one of those tools or swords, should be obvious what you’re missing.

gusty epoch
#

hmm alr

naive solstice
#

I’m on my phone right now, otherwise I’d just show you.

gusty epoch
#

ah alr