Posted February 18, 20196 yr No matter what I set my tool material's attack damage value to, it loads into the game as over 700 attack damage. Any ideas why or is this a bug? ToolMaterialList class public enum ToolMaterialList implements IItemTier { TUTORIAL(1.7f, 5.0f, 25, 700, 3, ItemList.tutorial_item); private float attackDamage, efficiency; private int enchantability, durability, harvestLevel; private Item repairMaterial; private ToolMaterialList(float attackDamage, float efficiency, int enchantability, int durability, int harvestLevel, Item repairMaterial) { this.attackDamage = attackDamage; this.efficiency = efficiency; this.enchantability = enchantability; this.durability = durability; this.harvestLevel = harvestLevel; this.repairMaterial = repairMaterial; } @Override public float getAttackDamage() { return this.attackDamage; } @Override public float getEfficiency() { return this.efficiency; } @Override public int getEnchantability() { return this.enchantability; } @Override public int getHarvestLevel() { return this.harvestLevel; } @Override public int getMaxUses() { return this.durability; } @Override public Ingredient getRepairMaterial() { return Ingredient.fromItems(repairMaterial); } } Example of a tool class (they are all the same) public class ItemTutorialAxe extends ItemAxe { public ItemTutorialAxe(IItemTier tier, Item.Properties properties) { super(tier, tier.getMaxUses(), 0, properties); } }
February 19, 20196 yr What is this "TUTORIAL" at the second line ? Souldn't it be "private ToolMaterialList" instead ?
February 19, 20196 yr 29 minutes ago, sunsigne said: What is this "TUTORIAL" at the second line ? Souldn't it be "private ToolMaterialList" instead ? It's an enum so it's right Classes: 94 Lines of code: 12173 Other files: 206 Github repo: https://github.com/KokkieBeer/DeGeweldigeMod
March 1, 20196 yr Seems like a Forge bug. Durability seems to be the Attack damage. TUTORIAL(1.7f, 5.0f, 25, Attack Damage / not durability at Tools, 3, ItemList.tutorial_item); To overrun this go to your Registry / properties and add: defaultMaxDamage(700)
March 2, 20196 yr The ItemAxe constructor takes attack damage as an argument, not durability. You're passing in the durability, so it always ends up being 700. Edited March 2, 20196 yr by TrazorMC
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.