MSpace-Dev Posted November 16, 2017 Posted November 16, 2017 (edited) Hello everyone, I am trying to add a universal tool material that I can use on all tools, instead of having to set the properties for each tool, like how you can select ToolMaterial.DIAMOND, I want to have an option like ModToolMaterial.TIN for example. So, I've added this in my Reference.java public static Item.ToolMaterial TIN = EnumHelper.addToolMaterial("TIN", 3, 1561, 8, 3, 22); Now, how can I set my material to this in the Item class? Thanks in advance! Edited November 16, 2017 by MSpace-Dev Quote
Draco18s Posted November 16, 2017 Posted November 16, 2017 I'm not sure what your problem is. https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/ores/OresBase.java#L281 1 Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
MSpace-Dev Posted November 16, 2017 Author Posted November 16, 2017 (edited) So, I've added this in my Reference.java public static Item.ToolMaterial TIN = EnumHelper.addToolMaterial("TIN", 3, 1561, 8, 3, 22); Now, how can I set my material to this in the Item class? I can't find any set methods derived from the Item class to do this I see you just have: diaStudPick = new ItemDiamondStudPickaxe(toolMaterialDiamondStud); And I'd love to know what's in your constructor, and how you set the material in that class Edited November 16, 2017 by MSpace-Dev Quote
Ugdhar Posted November 16, 2017 Posted November 16, 2017 26 minutes ago, MSpace-Dev said: And I'd love to know what's in your constructor, and how you set the material in that class It's all in the github repo there, just browse around the source files 1 Quote
MSpace-Dev Posted November 16, 2017 Author Posted November 16, 2017 Alright thanks for the tips and help. I've got my register down to this now public class ModItems { public static final Item[] ITEMS = { new ItemTinIngot("tin_ingot"), new ItemTinSword("tin_sword", Reference.TIN) }; } Quote
Recommended Posts
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.