I'm trying to create a tool with already an enchantment on it
I was used to it in 1.12 with the getSubItem() method but in 1.14 I don't know how to do it properly (several hours ago it happened that I made it work as intended but there was another issue and the time I solved that new issue I literally forgot how I made the enchantment thing to work again... I'm a genius)
I tried with the fillItemGroup() method since it resembles the getSubItem, and it works for the enchantment but then it just put my tool into every tab (group) in creative and I cannot solve it
In my tool class there's one of my (obviously wrong) attempt to add the enchantment via getDefaultInstance()
I hope you can help me D:
(if you find any syntax error into the pastes it's because I deleted a lot of code for other items, blocks ecc to make it a lot more clear)
[EDIT]: I found a solution (even if not the proper one) with fillItemGroup(), even if I had to use onCreated() too cause I couldn't get the enchantment when I crafted the tool... So I won't "SOLVED" this thread yet cause of my lack of knowledge, hoping someone can fill it (my english sucks, I know, sorry)
Hi
I'm trying to create a tool with already an enchantment on it
I was used to it in 1.12 with the getSubItem() method but in 1.14 I don't know how to do it properly (several hours ago it happened that I made it work as intended but there was another issue and the time I solved that new issue I literally forgot how I made the enchantment thing to work again... I'm a genius)
I tried with the fillItemGroup() method since it resembles the getSubItem, and it works for the enchantment but then it just put my tool into every tab (group) in creative and I cannot solve it
So this is my TOOL CLASS , this my ITEMS CLASS and this my REGISTRIES
In my tool class there's one of my (obviously wrong) attempt to add the enchantment via getDefaultInstance()
I hope you can help me D:
(if you find any syntax error into the pastes it's because I deleted a lot of code for other items, blocks ecc to make it a lot more clear)
[EDIT]: I found a solution (even if not the proper one) with fillItemGroup(), even if I had to use onCreated() too cause I couldn't get the enchantment when I crafted the tool... So I won't "SOLVED" this thread yet cause of my lack of knowledge, hoping someone can fill it (my english sucks, I know, sorry)