File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
src/main/java/anticope/rejects/modules Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -31,15 +31,20 @@ public VehicleOneHit() {
31
31
super (MeteorRejectsAddon .CATEGORY , "vehicle-one-hit" , "Destroy vehicles with one hit." );
32
32
}
33
33
34
+ private boolean isManualSend = false ;
35
+
34
36
@ EventHandler
35
37
private void onPacketSend (PacketEvent .Send event ) {
38
+ if (isManualSend ) return ;
36
39
if (!(event .packet instanceof PlayerInteractEntityC2SPacket )
37
40
|| !(mc .crosshairTarget instanceof EntityHitResult ehr )
38
41
|| (!(ehr .getEntity () instanceof AbstractMinecartEntity ) && !(ehr .getEntity () instanceof BoatEntity ))
39
42
) return ;
40
43
44
+ isManualSend = true ;
41
45
for (int i = 0 ; i < amount .get () - 1 ; i ++) {
42
46
mc .player .networkHandler .getConnection ().send (event .packet , null );
43
47
}
48
+ isManualSend = false ;
44
49
}
45
50
}
You can’t perform that action at this time.
0 commit comments