Posted January 9, 20214 yr I have an event handler, but there is no reference to the player or his inventory in event. How to get what item the player is holding from the handler that does not have a link to the inventory?
January 9, 20214 yr Author player its player🤷♂️ @SubscribeEvent*/ public static void renderEnergy(RenderGameOverlayEvent.Post event) { if( in the hands of the required item ){ Minecraft.getInstance().fontRenderer.drawString(event.getMatrixStack(), "TEXT", event.getWindow().getScaledWidth()-10, event.getWindow().getScaledHeight()-2, 255); } }
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.