Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Cratthorax

  • Rank
    Tree Puncher
  1. Better? @SubscribeEvent public static void onBlockBreak(BlockEvent.BreakEvent event) { PlayerEntity playerRef = event.getPlayer(); ServerPlayerEntity playerMain = (ServerPlayerEntity) playerRef; GameType gameMode = playerMain.interactionManager.getGameType(); //@SuppressWarnings("resource") //GameType gameType = Minecraft.getInstance().playerController.getCurrentGameType(); ItemStack heldItems = event.getPlayer().getHeldItemMainhand(); Item toolRef = heldItems.getItem(); if(!gameMode.isCreati
  2. Sorry, I'm out of practice. It's hard for me to comprehend what you're saying. With "reaching across logical sides" you mean I'm utilizing server and client in one sentence? Also, why gameMode? What's the difference to gameType? I was actually referring to this thread, were you gave that example... For the main client player: Minecraft#playerController.getCurrentGameType() ...to get the client side gameType. I want the client side.
  3. Hello, coming from 1.7.2, and 1.12.2 I figured the "old" way of getting game type does no longer work. It took a while and a bit of searching to find an old 2019 thread, were @diesieben07 is giving instructions, that did not work out of the box, but finally did with a bit of fiddling. This is the code block in my event handler:
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.