forked from RepoMirrors/kami-blue
fix world not loading bug
This commit is contained in:
parent
1fff7ba1c4
commit
2142c4455e
|
@ -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 */
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue