fix world not loading bug

This commit is contained in:
Bella 2020-02-29 11:40:32 -05:00
parent 1fff7ba1c4
commit 2142c4455e
1 changed files with 4 additions and 4 deletions

View File

@ -43,10 +43,11 @@ public class OffhandGap extends Module {
@EventHandler @EventHandler
private Listener<PacketEvent.Send> sendListener = new Listener<>(e ->{ private Listener<PacketEvent.Send> sendListener = new Listener<>(e ->{
while (!cancelled) { /* Super safe cancel everything method */
if (e.getPacket() instanceof CPacketPlayerTryUseItem) { if (e.getPacket() instanceof CPacketPlayerTryUseItem) {
/* Disable running code if your health doesn't meet requirements */ if (cancelled) { /* Disable running code if your health doesn't meet requirements */
if (cancelled) return; forceTotems();
return;
}
if (mc.player.getHeldItemMainhand().getItem() instanceof ItemSword || mc.player.getHeldItemMainhand().getItem() instanceof ItemAxe || passItemCheck()) { if (mc.player.getHeldItemMainhand().getItem() instanceof ItemSword || mc.player.getHeldItemMainhand().getItem() instanceof ItemAxe || passItemCheck()) {
if (ModuleManager.isModuleEnabled("AutoTotem")) { /* Save used state of AutoTotem to use later */ if (ModuleManager.isModuleEnabled("AutoTotem")) { /* Save used state of AutoTotem to use later */
autoTotemLocalState = true; autoTotemLocalState = true;
@ -70,7 +71,6 @@ public class OffhandGap extends Module {
/* Force disable if under health limit */ /* Force disable if under health limit */
else if (mc.player.getHealth() + mc.player.getAbsorptionAmount() <= disableHealth.getValue()) disableGaps(); else if (mc.player.getHealth() + mc.player.getAbsorptionAmount() <= disableHealth.getValue()) disableGaps();
} catch (NullPointerException ignored) { } // epic meme } catch (NullPointerException ignored) { } // epic meme
}
forceTotems(); /* After doing the safe cancel, make sure totems are in the offhand */ forceTotems(); /* After doing the safe cancel, make sure totems are in the offhand */
}); });