Posted January 24, 20205 yr This cord gets 2 different values of player.distanceWalkedModified from Render Thread and Server Thread. How do I get only one of these? @SubscribeEvent public static void getDistanceWalked(TickEvent.PlayerTickEvent event) { float walkDistance = (float)(event.player.distanceWalkedModified / 0.6); LOGGER.debug("now: " + event.player.distanceWalkedModified / 0.6 + "blocks"); } Edited January 24, 20205 yr by kyazuki
January 24, 20205 yr Can you get a world object to check if your world isRemote? I would imagine that the render thread doesn't run on the server and/or is not the one you're looking for.
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.