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.

Leaderboard

Popular Content

Showing content with the highest reputation on 11/03/22 in all areas

  1. That way of doing it is very inefficient. The PlayerTick event is called on the client and server at both the start and end of each tick. You should be checking event.side and event.phase to limit when you do things. The onUpdateAbilities() sends a network packet to the other side. So, your code would be sending 4 network packets per player per tick. Here's a more efficient way: @Mod.EventBusSubscriber(modid = MODID) public class Events { @SubscribeEvent public static void equipmentChange(LivingEquipmentChangeEvent event) { if (event.getEntity() instanceof Player player && event.getSlot() == EquipmentSlot.OFFHAND) { // WARNING: Proof of concept code not the correct logic player.getAbilities().mayfly = event.getTo().is(Items.DIAMOND); player.onUpdateAbilities(); } } } That event only happens on the server and only when the equipment actually changes. The above works for me, using diamonds in the shield slot as my trigger. WARNING. The above logic is not complete. One example is, it would remove flight from creative mode players when they remove the diamond. Another is it doesn't set flying=false when the diamonds are removed.
  2. You're right. That is a bug. You should report it as an issue on github MinecraftForge project. EDIT: I've gone ahead and logged the issue: #4617
  3. Figured it out; for some reason SpawnAlwaysVisibleParticle() is defaulting ignoreRange to false... but the SpawnParticle with a boolean condition works just fine. Thanks for your help!

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.