-
Recently Browsing
- No registered users viewing this page.
-
Posts
-
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 } }
-
well i ran it again and it did not work, i went into the logs folder for the modpack and i do not see debug.log
-
By diesieben07 · Posted
If your game works now there is no point posting it. And no, I specifically asked for the debug.log. -
By diesieben07 · Posted
That is highly doubtful. -
I went to the logs folder, and do you want the one that says latest?
-
-
Topics
-
Who's Online (See full list)
Recommended Posts
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.