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.

Ayregon

Members
  • Joined

  • Last visited

Everything posted by Ayregon

  1. Hi! I am new to Forge modding (not java), and I am trying to build a statistics mod to keep track of things like how many blocks of X type has a player mined, how many times the player have received damage and how much damage has been received, xp obtained... But I am constantly finding the problem of things working on a single player mode but not on multiplayer. Events like PlayerXpEvent.PickupXp are firing only when the server is hosted by the client. I understand this is because this events are handled server side, and I have found workarounds like using the players inventory to keep track of the blocks, but this is very limiting. I was wondering if there was a way to listen to those events also in the client side. I have searched and searched this forum and Google but I only find outdated or dead posts. My code (Really simple): @Mod.EventBusSubscriber(modid = Minestats.MODID, bus = Mod.EventBusSubscriber.Bus.FORGE, value = Dist.CLIENT) public class Events { @SubscribeEvent public static void onItemPickup(final PlayerXpEvent.PickupXp event) { Minestats.saveNewXpValue(event.getOrb().getValue(), new Timestamp(System.currentTimeMillis())); // This just saves it in a JSON file } }

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.