Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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.

  • 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.

  • 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

 

  • 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. 

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

  • 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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.