Posted June 3, 20196 yr So basically every time InputUpdateEvent I am calling this method that I created public void clickMouse(boolean leftClick) { try { if(clickMethod == null) { clickMethod = ObfuscationReflectionHelper.findMethod(minecraftClass,"func_147116_af"); //clickMouse(); clickBlockMethod = ObfuscationReflectionHelper.findMethod(minecraftClass,"func_147115_a",boolean.class); //sendClickBlockToController(boolean leftClick); clickMethod.setAccessible(true); clickBlockMethod.setAccessible(true); } if(leftClick) { clickMethod.invoke(Minecraft.getInstance()); } clickBlockMethod.invoke(Minecraft.getInstance(),leftClick); } catch (IllegalAccessException | InvocationTargetException e) { e.printStackTrace(); } } However calling it every event makes it so it breaks a block seemingly every tick in creative and in survival it doesn't actually break the block, just creates the block hit particles. I looked into Minecraft's code and saw it had the delays in the methods built-in for the tick time, however they seemed to be skipped. Do I have to implement my own delays? Or am I just missing a call to a function? Should I also stop calling clickMethod after it's been called once until they let go of the trigger? Edited June 3, 20196 yr by fernthedev Solved my code, at least for now
June 3, 20196 yr Author Well somehow I changed some code and accidentally fixed my issue. Thanks to anyone who was going to try to help though
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.