Posted February 28, 20214 yr I making some custom emchantment, and would like them to show up on an Custom ItemGroup, but i don't know where to start, i tried looking into some classes and did some google about it, but can't find anything usefull.
March 1, 20214 yr Just create an instance of ItemGroup, and set the group of the item in the item property builder.
March 1, 20214 yr Author But how can i do that for an enchantment book, for normal items i was able to do that by calling the function "group" as you said, but with the enchantment seems to be different.
March 3, 20214 yr Author On 3/1/2021 at 5:07 AM, diesieben07 said: If you have a custom EnchantmentType, you can use ItemGroup#setRelevantEnchantmentTypes to set which enchanted books are shown there. If you don't (or can't make) a custom EnchantmentType, override the fill method in your ItemGroup and add whatever ItemStacks you want to the list. This won't prevent the books from showing up in other ItemGroups though, which you cannot prevent. Thanks, it worked ... I tried the second way, but i'll create an custom EnchantmentType to organize things better. One last thing ... how i can "rename" the enchantment in the lang file, tried several things and nothing works, the enchantment keeps showing it's registry name
March 3, 20214 yr Show what you tried then. It should be "enchantment.your_mod_id.your_enchantment_id" Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port
March 3, 20214 yr Author 2 hours ago, Beethoven92 said: Show what you tried then. It should be "enchantment.your_mod_id.your_enchantment_id" That's what i tried: "enchantment.bunchofthings.grass_walker": "Grass Walker", "enchantment.grass_walker": "Grass Walker", "bunchofthings.grass_walker": "Grass Walker", But when in an enchantment item GUI it shows "grass_walker I", "grass_walker II" and so on.
March 3, 20214 yr Only the first one is correct...i think the problem is that your lang file may be invalid..post a link to your repository please Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port
March 3, 20214 yr Author i have other entries in the lang file that work well ... https://github.com/samjviana/bunchofthings
March 3, 20214 yr Oh..yeah, the problem is here: protected GrassWalkerEnchament() { super(Enchantment.Rarity.VERY_RARE, EnchantmentType.ARMOR_FEET, new EquipmentSlotType[] {EquipmentSlotType.FEET}); this.name = "grass_walker"; } You don't need to assign a name to your enchantment using the name field...you already registered your enchantment with your mod id and the enchantment id, thats all the game needs Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port
March 3, 20214 yr Author Oh ... such a simple thing LOL, pretty dumb of me by not realizing that. Thanks for the help ... i'll remove this line.
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.