Hi everyone. I'm creating a tools mod with custom materials. I thought on creating a class for each tool type (e.g: ModItemDirtSword.java, ModItemDirtAxe.java, etc...) but now I'd like to create a class for each tool only (ModItemSword.java, ModItemAxe.java, etc...) and assing a texture that depends on the material I defined.
And by the way, how should I deal with the registryName and the unlocalizedName for this?
Hi everyone. I'm creating a tools mod with custom materials. I thought on creating a class for each tool type (e.g: ModItemDirtSword.java, ModItemDirtAxe.java, etc...) but now I'd like to create a class for each tool only (ModItemSword.java, ModItemAxe.java, etc...) and assing a texture that depends on the material I defined.
And by the way, how should I deal with the registryName and the unlocalizedName for this?
Thank you guys.
I solved it by passing two more arguments to the ModItemSword constructor.
Here's the detailed solution:
1) I defined a material in my ModItems.java class
I had to import EnumHelper class
2) The ModItemSword constructor has two arguments for setting the item unlocalized name and its registry name
3) My ModItems.java class
And I call this init() method in my ClientProxy.java class