Posted July 5, 20169 yr I was trying my mod on MultiMC and I got this error on console java.lang.NoSuchMethodError: net.minecraft.item.Item$ToolMaterial.getMaxUses() Then I go back to eclipse, try the mod and it launchs without errors, then I build it again, try it again on MultiMC and it does launch ok. What could be happening? The error came from this lines of code mainly: private static final ToolMaterial STICK = EnumHelper.addToolMaterial("STICK", 0, 353, 2.0F, 0.0F, 15); public static final Item fake_dongle = new FakeDongle(STICK, "fake_dongle"); And on FakeDongle public FakeDongle(ToolMaterial material, String name) { // super(material); this.maxStackSize = 1; this.setMaxDamage(material.getMaxUses()); this.setRegistryName(name); this.setUnlocalizedName(ModInfo.MODID.toLowerCase() + ":" + name); }
July 5, 20169 yr Author Yes it works now. If I remember correctly I think time ago something similar happened, also with this ToolMaterial thing.
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.