Posted February 2, 20214 yr I'm currently trying to create a mechanism on the Minecraft server that allows one player to use one item and stop the other players from moving. As a way of thinking ・ Modify the time tick of each Client game ・ By disabling the key input of all Clients, it becomes immobile. There are two. I tried the former with reference to Carpet Mod, but I gave up because it seems that I need to rewrite the Minecraft code of the part that is not supported by Forge. So, for the latter, I tried using KeyBinding # unPressAllKeys () etc., but I can still operate the viewpoint with the mouse, change the items I have, etc. Is there a way to solve these?
February 2, 20214 yr Author I tried using MouseHelper#ungrabMouse () and KeyBinding#unPressAllKeys (), referring to the vanilla GUI code. Then, the mouse movement and the player movement became impossible. However, you can still switch items with the F5 key, mouse scroll, etc. (however, these may or may not work when pressed). This is to solve is to think of a thing that we need InputUpdateEvent, Can you tell me how to cancel how to input because they did not see any documents about it.
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.