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.

Eridiah

Members
  • Joined

  • Last visited

Everything posted by Eridiah

  1. Wow, I'm an idiot. Thanks so much! This is much more convenient!
  2. I am currently making a Sugarcane block. I'd like to have the block be able to be placed in multiple formations and directions, just like logs. To do this, I simply copied and edited vanilla Log code to get the desired results. However, this method seemed slightly inefficient, and I was wondering if there was a better way to do so, or at least more practical? Thanks! ~EridiahMods
  3. Although this thread is suuuper dead, in case anyone needs the working code, here it is: public void onUpdate(ItemStack stack, World world, Entity entity, int i, boolean bool) { super.onUpdate(stack, world, entity, i, bool); if(stack.isItemEnchanted() == false) { stack.addEnchantment(MainRegistry.customEnchantment, 2); // Or, Enchantments.whateverEnchantmentYouWant super.onUpdate(stack, world, entity, i, bool); } } Basically, the variables on the second super.onUpdate method were incorrect. Just match the variables of the super with the onUpdate method and everything should work. Also, take a look at where my code says: (MainRegistry.customEnchantment, 2); This line is swappable and will change. If you're doing in game enchantments, then do: (Enchantments.nameOfEnchantment, idOfTheEnchantment); The code I have is for custom enchantments, for which you call your main modding class.

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.