diff --git a/Client/src/main/java/de/com/baseband/client/feature/Feature.java b/Client/src/main/java/de/com/baseband/client/feature/Feature.java index 433baa5..62dd14e 100644 --- a/Client/src/main/java/de/com/baseband/client/feature/Feature.java +++ b/Client/src/main/java/de/com/baseband/client/feature/Feature.java @@ -266,7 +266,7 @@ public abstract class Feature extends ToggleButton implements SetCommand { protected boolean notIngame() { if (mc == null) { - throw new RuntimeException(); + throw new RuntimeException("BaseBand BUG - Code FNOMCN"); } return mc.world == null || mc.player == null; } @@ -374,6 +374,9 @@ public abstract class Feature extends ToggleButton implements SetCommand { } public void internalOnEveryTick() { + if (mc == null) { + throw new RuntimeException("BaseBand BUG - Code FNOMCT"); + } if(enabled && !tryEnable()) toggle(); onEveryTick(); diff --git a/Client/src/main/java/de/com/baseband/client/feature/modules/ingame/MidClick.java b/Client/src/main/java/de/com/baseband/client/feature/modules/ingame/MidClick.java index 5a91a62..db0c61a 100644 --- a/Client/src/main/java/de/com/baseband/client/feature/modules/ingame/MidClick.java +++ b/Client/src/main/java/de/com/baseband/client/feature/modules/ingame/MidClick.java @@ -108,6 +108,8 @@ public class MidClick extends Feature { down = true; RayTraceResult hover = mc.objectMouseOver; + if(hover == null) + return; if(hover.entityHit != null) { if(hover.entityHit instanceof EntityPlayer) { playerAction.action.accept(((EntityPlayer) hover.entityHit)); diff --git a/Client/src/main/java/de/com/baseband/client/feature/modules/ingame/Select.java b/Client/src/main/java/de/com/baseband/client/feature/modules/ingame/Select.java index 7df2eba..1ac48af 100644 --- a/Client/src/main/java/de/com/baseband/client/feature/modules/ingame/Select.java +++ b/Client/src/main/java/de/com/baseband/client/feature/modules/ingame/Select.java @@ -82,7 +82,9 @@ public class Select extends Feature { if(!renderSelection) return; Selection selection = Select.selection; - if(selection == null && mc.objectMouseOver != null) { + if(selection == null) { + if(mc.objectMouseOver == null) + return; BlockPos pos = mc.objectMouseOver.getBlockPos(); //noinspection ConstantValue - pos can indeed be null. if(renderIncomplete && begin != null && pos != null)