My PC crashes when i click on "Alts" button on Impact Client, anyone knows the solution?
-
Recently Browsing
- No registered users viewing this page.
-
Posts
-
on client you always can use Minecraft.getInstance(), then you be able to get the local player
-
In ClickTickEvent i dont know how to get the player public static void handle(InputMessage message, Supplier<NetworkEvent.Context> contextSupplier) { NetworkEvent.Context context = contextSupplier.get(); ServerPlayerEntity player = context.getSender(); ItemStack gauntlet = player.getMainHandItem(); if(gauntlet.getItem() instanceof InfinityGauntlet) { INamedContainerProvider ncp = new InfinityGauntlet.InfinityGauntletContainerProvider((InfinityGauntlet) gauntlet.getItem(), gauntlet); NetworkHooks.openGui(player, ncp); context.setPacketHandled(false); } } You were right I check the item on the server and this code works Thanks
-
KeyBindings are client side only, you need to use TickEvent.ClientTickEvent instead why did you call KeyBinding#consumeClick, you should only check KeyBinding#isDown? last but not least i would recommend you to check the Item also on server side (in the handle method of the Message), since you should never trust the client
-
By diesieben07 · Posted
You should use 1.16.5 if you want to use 1.16. 1.16.4 is not supported. 1.16 requires Java 8.
-
-
Topics
-
Who's Online (See full list)
Recommended Posts