Skip to content

Commit 24b148b

Browse files
committed
fix #385
1 parent 356c6ef commit 24b148b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/java/anticope/rejects/modules/VehicleOneHit.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,20 @@ public VehicleOneHit() {
3131
super(MeteorRejectsAddon.CATEGORY, "vehicle-one-hit", "Destroy vehicles with one hit.");
3232
}
3333

34+
private boolean isManualSend = false;
35+
3436
@EventHandler
3537
private void onPacketSend(PacketEvent.Send event) {
38+
if (isManualSend) return;
3639
if (!(event.packet instanceof PlayerInteractEntityC2SPacket)
3740
|| !(mc.crosshairTarget instanceof EntityHitResult ehr)
3841
|| (!(ehr.getEntity() instanceof AbstractMinecartEntity) && !(ehr.getEntity() instanceof BoatEntity))
3942
) return;
4043

44+
isManualSend = true;
4145
for (int i = 0; i < amount.get() - 1; i++) {
4246
mc.player.networkHandler.getConnection().send(event.packet, null);
4347
}
48+
isManualSend = false;
4449
}
4550
}

0 commit comments

Comments
 (0)