diff --git a/Client/src/main/java/de/com/baseband/client/Setup.java b/Client/src/main/java/de/com/baseband/client/Setup.java index 0913d37..c298d2b 100644 --- a/Client/src/main/java/de/com/baseband/client/Setup.java +++ b/Client/src/main/java/de/com/baseband/client/Setup.java @@ -11,6 +11,7 @@ import de.com.baseband.client.feature.modules.movement.NoSlowDown; import de.com.baseband.client.feature.modules.movement.Velocity; import de.com.baseband.client.feature.modules.player.AntiLevitation; import de.com.baseband.client.feature.modules.player.AutoRespawn; +import de.com.baseband.client.feature.modules.player.InteractionTweaks; import de.com.baseband.client.feature.modules.render.*; import de.com.baseband.client.feature.modules.world.*; @@ -56,6 +57,9 @@ public class Setup { new Help(), new HUD(), //new HUD.ShowTPS(), + new InteractionTweaks(), + new InteractionTweaks.FastBreak(), + new InteractionTweaks.FastUse(), new MidClick(), new Nametags(), new NoRender(), diff --git a/Client/src/main/java/de/com/baseband/client/feature/modules/player/InteractionTweaks.java b/Client/src/main/java/de/com/baseband/client/feature/modules/player/InteractionTweaks.java index 49d666e..f1dab76 100644 --- a/Client/src/main/java/de/com/baseband/client/feature/modules/player/InteractionTweaks.java +++ b/Client/src/main/java/de/com/baseband/client/feature/modules/player/InteractionTweaks.java @@ -2,6 +2,7 @@ package de.com.baseband.client.feature.modules.player; import de.com.baseband.client.event.events.DamageBlockEvent; import de.com.baseband.client.feature.Feature; +import de.com.baseband.client.feature.Features; import de.com.baseband.client.feature.category.Player; import de.com.baseband.client.mixin.mixins.IMinecraft; import de.com.baseband.client.mixin.mixins.IPlayerControllerMP; @@ -19,17 +20,14 @@ public class InteractionTweaks extends Feature { return "InteractionTweaks"; } - public final FastBreak fastBreak = new FastBreak(); - public final FastUse fastUse = new FastUse(); - @Override protected void setup() { - subComponents.add(fastBreak); - subComponents.add(fastUse); + Features.ifFeaturePresent(FastUse.class, subComponents::add); + Features.ifFeaturePresent(FastBreak.class, subComponents::add); } @Player - public class FastUse extends Feature { + public static class FastUse extends Feature { @Override public String toString() { return "FastUse"; @@ -58,14 +56,13 @@ public class InteractionTweaks extends Feature { } } - - public enum Mode { - Damage, - Packet - } - @Player - public class FastBreak extends Feature { + public static class FastBreak extends Feature { + + public enum Mode { + Damage, + Packet + } @Override public String toString() { @@ -82,16 +79,14 @@ public class InteractionTweaks extends Feature { public boolean noBreakDelay; @Override - public void onEveryTick() { - //Hot - if (enabled && !notIngame()) { - if(noBreakDelay) { - ((IPlayerControllerMP) (mc.playerController)).setBlockHitDelay(0); - } - text = this + "ยง7 [" + mode.toString() + "]"; - } else { - text = toString(); + public void onTick() { + if (notIngame()) + return; + + if(noBreakDelay) { + ((IPlayerControllerMP) (mc.playerController)).setBlockHitDelay(0); } + meta = mode.toString(); } @@ -114,7 +109,7 @@ public class InteractionTweaks extends Feature { } private boolean isNotUnbreakable(BlockPos pos) { - return mc.world.getBlockState(pos).getBlock().getBlockHardness(mc.world.getBlockState(pos), Minecraft.getMinecraft().world, pos) != -1; + return mc.world.getBlockState(pos).getBlockHardness(Minecraft.getMinecraft().world, pos) != -1; } @Override