diff options
author | alemi <me@alemi.dev> | 2023-03-08 17:25:34 +0100 |
---|---|---|
committer | alemi <me@alemi.dev> | 2023-03-08 17:25:34 +0100 |
commit | a9a232838d1c448945e14f6629cc26e012424b86 (patch) | |
tree | e03bf158c7d079a521f87b4872b5c5e63ce1583b /src | |
parent | 9c296d76dc85d2e7dc355962489b292ca8d65137 (diff) |
chore: remade FastInteract with Accesstransformers
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/ftbsc/bscv/modules/self/FastInteract.java | 25 | ||||
-rw-r--r-- | src/main/resources/META-INF/accesstransformer.cfg | 1 |
2 files changed, 4 insertions, 22 deletions
diff --git a/src/main/java/ftbsc/bscv/modules/self/FastInteract.java b/src/main/java/ftbsc/bscv/modules/self/FastInteract.java index 52bb33a..c256e00 100644 --- a/src/main/java/ftbsc/bscv/modules/self/FastInteract.java +++ b/src/main/java/ftbsc/bscv/modules/self/FastInteract.java @@ -13,32 +13,13 @@ import static ftbsc.bscv.Boscovicino.log; @AutoService(ILoadable.class) public class FastInteract extends QuickModule implements ICommons { - @Override - protected int getDefaultKey() { - return UNBOUND; - } - - Field delayField; - @Override - protected void onEnabled() { - try { - delayField = MC.getClass().getDeclaredField("field_71467_ac"); - delayField.setAccessible(true); - } catch (NoSuchFieldException e) { - log("! failed accessing delay field"); - this.disable(); - } - } + protected int getDefaultKey() { return UNBOUND; } @SubscribeEvent public void onTick(TickEvent.ClientTickEvent event) { if (MC == null) return; - try { - this.delayField.set(MC, 0); - } catch (IllegalAccessException e) { - log("! failed accessing delay field"); - this.disable(); - } + + MC.rightClickDelay = 0; } } diff --git a/src/main/resources/META-INF/accesstransformer.cfg b/src/main/resources/META-INF/accesstransformer.cfg index 6b795fb..f67a604 100644 --- a/src/main/resources/META-INF/accesstransformer.cfg +++ b/src/main/resources/META-INF/accesstransformer.cfg @@ -3,3 +3,4 @@ public net.minecraft.client.gui.screen.Screen field_230705_e_ # children public net.minecraft.client.network.play.NetworkPlayerInfo field_178866_b # gameMode public net.minecraft.network.play.client.CPlayerPacket field_149474_g # onGround public net.minecraft.client.multiplayer.PlayerController func_78750_j()V # ensureHasSentCarriedItem() +public net.minecraft.client.Minecraft field_71467_ac # rightClickDelay |