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.

yeatfan119

Members
  • Joined

  • Last visited

Everything posted by yeatfan119

  1. hey guys, i want to make my item give the player 2 hearts of absorption when theyre holding it (and when they arent take those hearts away). thing is, when i switch to it and off of it rapidly it glitches and gives either too much or none. can anyone help me here? below is my code @Override public void inventoryTick(ItemStack p_41404_, Level p_41405_, Entity p_41406_, int p_41407_, boolean p_41408_) { super.inventoryTick(p_41404_, p_41405_, p_41406_, p_41407_, p_41408_); if (p_41406_ instanceof Player player){ if (player.getMainHandItem() == p_41404_){ if (!flag) { player.setAbsorptionAmount(player.getAbsorptionAmount() + 4); flag = true; } } else { if (flag) { player.setAbsorptionAmount(player.getAbsorptionAmount() - 4); flag = false; } } } }

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.