Sigma 4.11 Criticals module 2 files, 448 lines

Sigma 4.11 Criticals: Full Source Analysis

Sigma 4.11's Criticals is a six-mode module (Packet, HPacket, Minis, HMinis, Hover, Jump) that injects C04 position packets from the pre-attack event and conditions every crit on the target's hurt resistance.

info/sigmaclient/module/impl/combat/Criticals.java · GitHub source ↗

Published 2026-08-12 · Updated 2026-08-12

Packets This Module Uses

Analysis

Overview

Sigma 4.11's Criticals is a six-mode module (Packet, HPacket, Minis, HMinis, Hover, Jump) that injects C04 position packets from the pre-attack event and conditions every crit on the target's hurt resistance. The core doCrits() routine sends y + 0.0626 off-ground, an optional y + 0.0626 + 1e-11 second lift in HPacket mode, and a return-to-ground C04 at the original y that deliberately claims onGround false. Hover mode rewrites the motion event instead: it zeroes lastReportedPosY, lifts y by 1E-8 with onGround true, then decays the lift by 5E-15/4E-15 per tick. Minis and HMinis prepend an onGround-true C06 before a Killaura jump, and Jump mode just calls the real jump(). A HURTTIME setting (default 15) plus ground-tick, step and timer gates decide when doCrits runs.

Architecture

The module subscribes to five event types. EventAttack (pre-attack phase) is the trigger: Packet and HPacket call doCrits() only when the player's own ground checks pass (mc.thePlayer.onGround and MoveUtils.isOnGround(0.001)), the target's hurtResistantTime is at or below the HURTTIME setting (default 15), no step has happened in the last 20 ticks (lastStep.check(20)), either 200ms elapsed or the target is still hittable (hurtResistantTime > 0), the player is collided vertically, and more than one ground tick has accumulated. EventUpdate maintains groundTicks and implements Hover; EventJump prepends the onGround-true C06 for Minis/HMinis on the Killaura setup tick; EventStep resets the step timer and the Hover stage after each step-up; EventPacket zeroes the Hover stage on any S08 teleport and carries a half-written C03 interception that is effectively dead (the HPacket branch inside it is commented out). LongJump and Bhop being enabled blocks the attack path entirely.

Jump offsets and timing

doCrits() uses off = 0.0626 - a hair above the classic 0.0625 pixel, per the source comment '0.0625, 17.64e-8' - and sends C04(x, y + off, z, false), then, in HPacket mode, C04(x, y + off + 0.00000000001, z, false), then C04(x, y, z, false). All three claim off-ground, including the return move, so the server's fall distance does not reset at the bottom of the hop. Hover mode works on the motion event: it sets lastReportedPosY to 0 (removing the vanilla moved-too-quickly y reference), claims onGround true at y + 1E-8 on stage 0, then steps y down by 5E-15 and 4E-15 on stages 1 and 2 while claiming off-ground, recycling to stage 0 as soon as y reaches the real position. Minis/HMinis send a C06 at the current position with onGround true during the jump's pre-event so the client can jump even though its previous packets claimed air. Every S08 teleport and post-step event resets the Hover stage so the cycle restarts from the new ground.

Interaction with attacks

The C04s are sent from the pre-attack phase of EventAttack, so they are written to the send queue before Killaura's C02 - the server processes the 0.0626 lift, sees the off-ground return, and the attack that follows registers a crit with roughly 0.06 of fall distance. The hurt-time gating is the module's rhythm: it only crits when the victim's hurtResistantTime is below the HURRTIME threshold (default 15), i.e. when the victim is actually hittable again, which also spaces crits naturally. The groundTicks > 1 requirement forces at least two consecutive grounded ticks before a crit, and the step timer prevents critting out of a step-up. The Hypixel warning posted in onEnable and on every mode change ('Packet criticals doesn't bypass on Hypixel') is Sigma's own acknowledgment that the packet modes are tuned for less aggressive servers; Jump mode (a real jump) is the fallback for those.

source Criticals.java (module logic)

Criticals.java205 lines · JavaOriginal ↗
1
package info.sigmaclient.module.impl.combat;
2
3
import tv.twitch.chat.Chat;
4
import info.sigmaclient.Client;
5
import info.sigmaclient.event.Event;
6
import info.sigmaclient.event.RegisterEvent;
7
import info.sigmaclient.event.impl.EventAttack;
8
import info.sigmaclient.event.impl.EventJump;
9
import info.sigmaclient.event.impl.EventPacket;
10
import info.sigmaclient.event.impl.EventStep;
11
import info.sigmaclient.event.impl.EventUpdate;
12
import info.sigmaclient.management.MoveUtils;
13
import info.sigmaclient.management.notifications.Notifications;
14
import info.sigmaclient.module.Module;
15
import info.sigmaclient.module.data.ModuleData;
16
import info.sigmaclient.module.data.Options;
17
import info.sigmaclient.module.data.Setting;
18
import info.sigmaclient.module.impl.movement.Bhop;
19
import info.sigmaclient.module.impl.movement.LongJump;
20
import info.sigmaclient.util.misc.ChatUtil;
21
import info.sigmaclient.util.misc.Timer;
22
import net.minecraft.client.Minecraft;
23
import net.minecraft.entity.Entity;
24
import net.minecraft.network.Packet;
25
import net.minecraft.network.play.client.C02PacketUseEntity;
26
import net.minecraft.network.play.client.C03PacketPlayer;
27
import net.minecraft.network.play.client.C07PacketPlayerDigging;
28
import net.minecraft.network.play.client.C08PacketPlayerBlockPlacement;
29
import net.minecraft.network.play.client.C0APacketAnimation;
30
import net.minecraft.network.play.client.C0FPacketConfirmTransaction;
31
import net.minecraft.network.play.server.S08PacketPlayerPosLook;
32
import net.minecraft.network.play.server.S2APacketParticles;
33
34
public class Criticals extends Module {
35
36
    public static String PACKET = "MODE";
37
    static String HURTTIME = "HURTTIME";
38
    public static String MODE = "";
39
    Timer lastStep = new Timer();
40
    Timer timer = new Timer();
41
    int groundTicks, stage, count;
42
    double y;
43
    //0.0625101D
44
    
45
    public Criticals(ModuleData data) {
46
        super(data);
47
        settings.put(PACKET, new Setting<>(PACKET, new Options("Mode", "Packet", new String[]{"Packet", "HPacket", "Minis", "HMinis", "Hover", "Jump"}), "Critical attack method."));
48
        settings.put(HURTTIME, new Setting<>(HURTTIME, 15, "The hurtTime tick to crit at.", 1, 0, 20));
49
    }
50
    @Override
51
    public void onEnable() {
52
    	stage = 0;
53
    	String mm = ((Options) settings.get(PACKET).getValue()).getSelected();
54
    	count = 0;
55
    	if(mm.equalsIgnoreCase("Packet") || mm.equalsIgnoreCase("Minis")){
56
   		 if (mc.getCurrentServerData() != null && mc.getCurrentServerData().serverIP.toLowerCase().contains("hypixel")){
57
   			 Notifications.getManager().post("Warning", mm + " criticals doesn't bypass on Hypixel.", Notifications.Type.WARNING);
58
   		 }
59
   	}
60
    }
61
    @Override
62
    @RegisterEvent(events = {EventPacket.class, EventUpdate.class, EventJump.class, EventAttack.class, EventStep.class})
63
    public void onEvent(Event event) {
64
        if(event instanceof EventStep){
65
        	EventStep es = (EventStep)event;
66
        
67
        	if(!es.isPre()){
68
        		lastStep.reset();
69
        		if(!mc.thePlayer.isCollidedHorizontally){
70
        			y = mc.thePlayer.boundingBox.minY;
71
        			stage = 0;
72
        		}
73
        	}
74
        }
75
        if (event instanceof EventUpdate) {
76
        	EventUpdate em = (EventUpdate)event;
77
            setSuffix(((Options) settings.get(PACKET).getValue()).getSelected() + " " + ((Number) settings.get(HURTTIME).getValue()).intValue());
78
            if(MoveUtils.isOnGround(0.001)){
79
            	groundTicks ++;
80
            }else if(!mc.thePlayer.onGround){
81
            	groundTicks = 0;
82
            }
83
           
84
            if(!MODE.equalsIgnoreCase(((Options) settings.get(PACKET).getValue()).getSelected())){          	
85
            	MODE = ((Options) settings.get(PACKET).getValue()).getSelected();
86
            	if(MODE.equalsIgnoreCase("Packet") || MODE.equalsIgnoreCase("Minis")){
87
            		 if (mc.getCurrentServerData() != null && mc.getCurrentServerData().serverIP.toLowerCase().contains("hypixel")){
88
            			 Notifications.getManager().post("Warning", MODE + " criticals doesn't bypass on Hypixel.", Notifications.Type.WARNING);
89
            		 }
90
            	}
91
        	}	
92
            if(!MODE.equalsIgnoreCase("Packet") && !MODE.equalsIgnoreCase("HPacket")){
93
            	setSuffix(((Options) settings.get(PACKET).getValue()).getSelected());
94
            }
95
            if(em.isPre() && MODE.equalsIgnoreCase("Hover")){
96
        		mc.thePlayer.lastReportedPosY = 0;
97
    			double ypos = mc.thePlayer.posY;
98
        		if(MoveUtils.isOnGround(0.001)){
99
        			em.setOnGround(false);
100
        			if(stage == 0){
101
        				y = ypos + 1E-8;
102
        				em.setOnGround(true);
103
        			}else if(stage == 1)
104
        				y-= 5E-15;
105
        			else
106
        				y-= 4E-15;
107
        			
108
        			if(y <= mc.thePlayer.posY){
109
        				stage = 0;
110
        				y = mc.thePlayer.posY;
111
        				em.setOnGround(true);
112
        			}
113
        			em.setY(y);
114
        			stage ++;
115
        		}else
116
        			stage = 0;
117
        		
118
            }
119
        }
120
        if (event instanceof EventPacket) {
121
            EventPacket ep = (EventPacket) event;
122
            Packet p = ep.getPacket();
123
         
124
            if (p instanceof S2APacketParticles ) {
125
            
126
                return;
127
            }
128
            if(p instanceof S08PacketPlayerPosLook){
129
		    	stage = 0;
130
            }
131
            if(p instanceof C0FPacketConfirmTransaction){
132
            	C0FPacketConfirmTransaction packet = (C0FPacketConfirmTransaction)p;
133
            	boolean accepted = packet.isAccepted();
134
            	int uid = packet.getId();
135
            	if(accepted && uid == 0){
136
        			count ++;
137
        			if(Killaura.target != null){
138
        			//	ep.setCancelled(true);
139
        			}
140
            	}		
141
            }
142
            if(p instanceof C03PacketPlayer && ep.isPre()){
143
            	C03PacketPlayer pa = (C03PacketPlayer)p;
144
            	double y = pa.y;
145
            	if(timer.getTime() == 0)
146
            	if(MODE.equalsIgnoreCase("HPacket")){
147
                	//ep.setPacket(new C03PacketPlayer(true));
148
            	}
149
            	
150
            }
151
        }
152
        if(event instanceof EventJump){
153
        	EventJump ej = (EventJump)event;
154
        	if(ej.isPre()){
155
        		 if (Killaura.isSetupTick() && Client.getModuleManager().isEnabled(Killaura.class)) {
156
        	        	if(MODE.equalsIgnoreCase("minis") || MODE.equalsIgnoreCase("HMinis")){
157
        	        		//if minis criticals is not on ground, send packet onground to be able to jump
158
        	        		Minecraft.getMinecraft().thePlayer.sendQueue.addToSendQueue(new C03PacketPlayer.C06PacketPlayerPosLook(
159
        	        				mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ, mc.thePlayer.rotationYaw, mc.thePlayer.rotationPitch, true));
160
        	        	}
161
        		 }
162
        	}
163
        }
164
        if(event instanceof EventAttack){
165
        	EventAttack ea = (EventAttack)event;
166
        	if(ea.isPreAttack()){
167
        	      if( ea.getEntity() != null){        	        
168
        	        	if(mc.thePlayer.onGround && MoveUtils.isOnGround(0.001) && !(Client.getModuleManager().isEnabled(LongJump.class) || Client.getModuleManager().isEnabled(Bhop.class))){
169
        	        		 if(MODE.equalsIgnoreCase("Packet") || MODE.equalsIgnoreCase("HPacket")){
170
        	                     if( ea.getEntity().hurtResistantTime <= ((Number) settings.get(HURTTIME).getValue()).doubleValue() && lastStep.check(20)
171
        	                    		 && (timer.check(200) || ea.getEntity().hurtResistantTime > 0) && mc.thePlayer.isCollidedVertically){
172
        	                    	 if(groundTicks > 1){
173
        	                    		 doCrits(); 
174
        	                    	 }
175
        	                    	
176
        	                     }
177
        	        		 }else if (!mc.thePlayer.isJumping && ((Options) settings.get(PACKET).getValue()).getSelected().equalsIgnoreCase("Jump")){
178
        	        			 mc.thePlayer.jump();
179
        	        		 }
180
        	        		 timer.reset();
181
        	        		 
182
        	        	}
183
        	        }  
184
        	}
185
        }
186
    }
187
188
    private boolean hurtTimeCheck(Entity entity) {
189
        return entity != null && entity.hurtResistantTime <= ((Number) settings.get(HURTTIME).getValue()).intValue();
190
    }
191
192
    public static void doCrits() {
193
    	//0.0625 , 17.64e-8 
194
    	double off = 0.0626;
195
		double x = mc.thePlayer.posX; double y = mc.thePlayer.posY; double z = mc.thePlayer.posZ;
196
		mc.thePlayer.sendQueue.addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(x, y+off, z, false));
197
		if(MODE.equalsIgnoreCase("HPacket")){
198
			mc.thePlayer.sendQueue.addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(x, y+off+0.00000000001, z, false));
199
		}
200
		mc.thePlayer.sendQueue.addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(x, y, z, false));
201
    	
202
    	
203
    } 
204
205
}

What this file does

The module is organized around the PACKET mode option and the HURTTIME number setting (lines 36-37). onEnable (line 50) resets stage and count and warns on Hypixel for Packet/Min. EventStep (line 64) resets lastStep and, when not collided horizontally, re-seeds y from the bounding box and zeroes stage. EventUpdate (line 75) counts groundTicks via MoveUtils.isOnGround(0.001), and the Hover branch (line 95) runs when the mode is Hover: it zeroes lastReportedPosY, then per stage lifts y by 1E-8 with onGround true, or subtracts 5E-15/4E-15 while claiming off-ground, recycling when y falls back to the real position. EventPacket (line 120) zeroes stage on S08, counts accepted uid-0 confirmations, and its C03 branch is dead (the HPacket rewrite is commented out). EventJump (line 152) sends the onGround-true C06 for Minis/HMinis on the Killaura setup tick so the client can jump after claiming air. EventAttack (line 164) is the trigger: with the hurt-time, step, timer, collided-vertically and groundTicks > 1 gates it calls doCrits() (line 192), which sends the 0.0626 lift, the optional HPacket 1e-11 second lift, and the off-ground return to y; the Jump mode branch (line 177) calls the real jump() instead.

source MoveUtils.java (ground probe)

MoveUtils.java243 lines · JavaOriginal ↗
1
package info.sigmaclient.management;
2
3
import javafx.geometry.BoundingBox;
4
import info.sigmaclient.module.data.Options;
5
import info.sigmaclient.module.impl.combat.InfiniteAura;
6
import info.sigmaclient.util.misc.ChatUtil;
7
import net.minecraft.block.Block;
8
import net.minecraft.block.BlockAir;
9
import net.minecraft.block.BlockLiquid;
10
import net.minecraft.block.BlockPressurePlate;
11
import net.minecraft.client.Minecraft;
12
import net.minecraft.entity.Entity;
13
import net.minecraft.entity.player.EntityPlayer;
14
import net.minecraft.network.play.client.C03PacketPlayer;
15
import net.minecraft.potion.Potion;
16
import net.minecraft.util.AxisAlignedBB;
17
import net.minecraft.util.BlockPos;
18
import net.minecraft.util.EnumFacing;
19
import net.minecraft.util.MathHelper;
20
import net.minecraft.util.Vec3;
21
22
public class MoveUtils {
23
    private static Minecraft mc = Minecraft.getMinecraft();
24
    public static double defaultSpeed() {
25
        double baseSpeed = 0.2873D;
26
        if (Minecraft.getMinecraft().thePlayer.isPotionActive(Potion.moveSpeed)) {
27
            int amplifier = Minecraft.getMinecraft().thePlayer.getActivePotionEffect(Potion.moveSpeed).getAmplifier();
28
          //  if(((Options) settings.get(MODE).getValue()).getSelected().equalsIgnoreCase("Hypixel")){
29
           // 	baseSpeed *= (1.0D + 0.225D * (amplifier + 1));
30
           // }else
31
            	baseSpeed *= (1.0D + 0.2D * (amplifier + 1));
32
        }
33
        return baseSpeed;
34
    }
35
    public static void strafe(double speed) {
36
        float a = mc.thePlayer.rotationYaw * 0.017453292F;
37
        float l = mc.thePlayer.rotationYaw * 0.017453292F - (float) Math.PI * 1.5f;
38
        float r = mc.thePlayer.rotationYaw * 0.017453292F + (float) Math.PI * 1.5f;
39
        float rf = mc.thePlayer.rotationYaw * 0.017453292F + (float) Math.PI * 0.19f;
40
        float lf = mc.thePlayer.rotationYaw * 0.017453292F + (float) Math.PI * -0.19f;
41
        float lb = mc.thePlayer.rotationYaw * 0.017453292F - (float) Math.PI * 0.76f;
42
        float rb = mc.thePlayer.rotationYaw * 0.017453292F - (float) Math.PI * -0.76f;
43
        if (mc.gameSettings.keyBindForward.pressed) {
44
            if (mc.gameSettings.keyBindLeft.pressed && !mc.gameSettings.keyBindRight.pressed) {
45
                mc.thePlayer.motionX -= (double) (MathHelper.sin(lf) * speed);
46
                mc.thePlayer.motionZ += (double) (MathHelper.cos(lf) * speed);
47
            } else if (mc.gameSettings.keyBindRight.pressed && !mc.gameSettings.keyBindLeft.pressed) {
48
                mc.thePlayer.motionX -= (double) (MathHelper.sin(rf) * speed);
49
                mc.thePlayer.motionZ += (double) (MathHelper.cos(rf) * speed);
50
            } else {
51
                mc.thePlayer.motionX -= (double) (MathHelper.sin(a) * speed);
52
                mc.thePlayer.motionZ += (double) (MathHelper.cos(a) * speed);
53
            }
54
        } else if (mc.gameSettings.keyBindBack.pressed) {
55
            if (mc.gameSettings.keyBindLeft.pressed && !mc.gameSettings.keyBindRight.pressed) {
56
                mc.thePlayer.motionX -= (double) (MathHelper.sin(lb) * speed);
57
                mc.thePlayer.motionZ += (double) (MathHelper.cos(lb) * speed);
58
            } else if (mc.gameSettings.keyBindRight.pressed && !mc.gameSettings.keyBindLeft.pressed) {
59
                mc.thePlayer.motionX -= (double) (MathHelper.sin(rb) * speed);
60
                mc.thePlayer.motionZ += (double) (MathHelper.cos(rb) * speed);
61
            } else {
62
                mc.thePlayer.motionX += (double) (MathHelper.sin(a) * speed);
63
                mc.thePlayer.motionZ -= (double) (MathHelper.cos(a) * speed);
64
            }
65
        } else if (mc.gameSettings.keyBindLeft.pressed && !mc.gameSettings.keyBindRight.pressed && !mc.gameSettings.keyBindForward.pressed && !mc.gameSettings.keyBindBack.pressed) {
66
            mc.thePlayer.motionX += (double) (MathHelper.sin(l) * speed);
67
            mc.thePlayer.motionZ -= (double) (MathHelper.cos(l) * speed);
68
        } else if (mc.gameSettings.keyBindRight.pressed && !mc.gameSettings.keyBindLeft.pressed && !mc.gameSettings.keyBindForward.pressed && !mc.gameSettings.keyBindBack.pressed) {
69
            mc.thePlayer.motionX += (double) (MathHelper.sin(r) * speed);
70
            mc.thePlayer.motionZ -= (double) (MathHelper.cos(r) * speed);
71
        }
72
73
    }
74
    public static void setMotion(double speed) {
75
        double forward = mc.thePlayer.movementInput.moveForward;
76
        double strafe = mc.thePlayer.movementInput.moveStrafe;
77
        float yaw = mc.thePlayer.rotationYaw;
78
        if ((forward == 0.0D) && (strafe == 0.0D)) {
79
        	mc.thePlayer.motionX = 0;
80
        	mc.thePlayer.motionZ = 0;
81
        } else {
82
            if (forward != 0.0D) {
83
                if (strafe > 0.0D) {
84
                    yaw += (forward > 0.0D ? -45 : 45);
85
                } else if (strafe < 0.0D) {
86
                    yaw += (forward > 0.0D ? 45 : -45);
87
                }
88
                strafe = 0.0D;
89
                if (forward > 0.0D) {
90
                    forward = 1;
91
                } else if (forward < 0.0D) {
92
                    forward = -1;
93
                }
94
            }
95
            mc.thePlayer.motionX = forward * speed * Math.cos(Math.toRadians(yaw + 90.0F)) + strafe * speed * Math.sin(Math.toRadians(yaw + 90.0F)); 
96
            mc.thePlayer.motionZ = forward * speed * Math.sin(Math.toRadians(yaw + 90.0F)) - strafe * speed * Math.cos(Math.toRadians(yaw + 90.0F));
97
        }
98
    }   
99
100
    public static boolean checkTeleport(double x, double y, double z,double distBetweenPackets){
101
    	double distx = mc.thePlayer.posX - x;
102
    	double disty = mc.thePlayer.posY - y;
103
    	double distz = mc.thePlayer.posZ - z;
104
    	double dist = Math.sqrt(mc.thePlayer.getDistanceSq(x, y, z));
105
    	double distanceEntreLesPackets = distBetweenPackets;
106
    	double nbPackets = Math.round(dist / distanceEntreLesPackets + 0.49999999999) - 1;
107
    	
108
    	double xtp = mc.thePlayer.posX;
109
    	double ytp = mc.thePlayer.posY;
110
    	double ztp = mc.thePlayer.posZ;		
111
    		for (int i = 1; i < nbPackets;i++){		
112
    			double xdi = (x - mc.thePlayer.posX)/( nbPackets);	
113
    			 xtp += xdi;
114
    			 
115
    			double zdi = (z - mc.thePlayer.posZ)/( nbPackets);	
116
    			 ztp += zdi;
117
    			 
118
    			double ydi = (y - mc.thePlayer.posY)/( nbPackets);	
119
    			ytp += ydi;			
120
    	    	AxisAlignedBB bb = new AxisAlignedBB(xtp - 0.3, ytp, ztp - 0.3, xtp + 0.3, ytp + 1.8, ztp + 0.3);
121
    	    	if(!mc.theWorld.getCollidingBoundingBoxes(mc.thePlayer, bb).isEmpty()){
122
    	    		return false;
123
    	    	}
124
    			
125
    		}
126
    	return true;
127
    }
128
129
130
    public static boolean isOnGround(double height) {
131
        if (!mc.theWorld.getCollidingBoundingBoxes(mc.thePlayer, mc.thePlayer.getEntityBoundingBox().offset(0.0D, -height, 0.0D)).isEmpty()) {
132
            return true;
133
        } else {
134
            return false;
135
        }
136
    }
137
    public static int getJumpEffect() {
138
        if (mc.thePlayer.isPotionActive(Potion.jump))
139
            return mc.thePlayer.getActivePotionEffect(Potion.jump).getAmplifier() + 1;
140
        else
141
            return 0;
142
    }
143
    public static int getSpeedEffect() {
144
        if (mc.thePlayer.isPotionActive(Potion.moveSpeed))
145
            return mc.thePlayer.getActivePotionEffect(Potion.moveSpeed).getAmplifier() + 1;
146
        else
147
            return 0;
148
    }
149
150
    public static Block getBlockUnderPlayer(EntityPlayer inPlayer, double height) {
151
        return Minecraft.getMinecraft().theWorld.getBlockState(new BlockPos(inPlayer.posX, inPlayer.posY - height, inPlayer.posZ)).getBlock();
152
    }
153
154
    public static Block getBlockAtPosC(double x, double y, double z) {
155
        EntityPlayer inPlayer = Minecraft.getMinecraft().thePlayer;
156
        return Minecraft.getMinecraft().theWorld.getBlockState(new BlockPos(inPlayer.posX + x, inPlayer.posY + y, inPlayer.posZ + z)).getBlock();
157
    }
158
159
    public static float getDistanceToGround(Entity e) {
160
        if (mc.thePlayer.isCollidedVertically && mc.thePlayer.onGround) {
161
            return 0.0F;
162
        }
163
        for (float a = (float) e.posY; a > 0.0F; a -= 1.0F) {
164
            int[] stairs = {53, 67, 108, 109, 114, 128, 134, 135, 136, 156, 163, 164, 180};
165
            int[] exemptIds = {
166
                    6, 27, 28, 30, 31, 32, 37, 38, 39, 40, 50, 51, 55, 59,
167
                    63, 65, 66, 68, 69, 70, 72, 75, 76, 77, 83, 92, 93, 94,
168
                    104, 105, 106, 115, 119, 131, 132, 143, 147, 148, 149, 150,
169
                    157, 171, 175, 176, 177};
170
            Block block = mc.theWorld.getBlockState(new BlockPos(e.posX, a - 1.0F, e.posZ)).getBlock();
171
            if (!(block instanceof BlockAir)) {
172
                if ((Block.getIdFromBlock(block) == 44) || (Block.getIdFromBlock(block) == 126)) {
173
                    return (float) (e.posY - a - 0.5D) < 0.0F ? 0.0F : (float) (e.posY - a - 0.5D);
174
                }
175
                int[] arrayOfInt1;
176
                int j = (arrayOfInt1 = stairs).length;
177
                for (int i = 0; i < j; i++) {
178
                    int id = arrayOfInt1[i];
179
                    if (Block.getIdFromBlock(block) == id) {
180
                        return (float) (e.posY - a - 1.0D) < 0.0F ? 0.0F : (float) (e.posY - a - 1.0D);
181
                    }
182
                }
183
                j = (arrayOfInt1 = exemptIds).length;
184
                for (int i = 0; i < j; i++) {
185
                    int id = arrayOfInt1[i];
186
                    if (Block.getIdFromBlock(block) == id) {
187
                        return (float) (e.posY - a) < 0.0F ? 0.0F : (float) (e.posY - a);
188
                    }
189
                }
190
                return (float) (e.posY - a + block.getBlockBoundsMaxY() - 1.0D);
191
            }
192
        }
193
        return 0.0F;
194
    }
195
    
196
    
197
    public static float[] getRotationsBlock(BlockPos block, EnumFacing face) {
198
        double x = block.getX() + 0.5 - mc.thePlayer.posX +  (double) face.getFrontOffsetX()/2;
199
        double z = block.getZ() + 0.5 - mc.thePlayer.posZ +  (double) face.getFrontOffsetZ()/2;
200
        double y = (block.getY() + 0.5);
201
        double d1 = mc.thePlayer.posY + mc.thePlayer.getEyeHeight() - y;
202
        double d3 = MathHelper.sqrt_double(x * x + z * z);
203
        float yaw = (float) (Math.atan2(z, x) * 180.0D / Math.PI) - 90.0F;
204
        float pitch = (float) (Math.atan2(d1, d3) * 180.0D / Math.PI);
205
        if (yaw < 0.0F) {
206
            yaw += 360f;
207
        }
208
        return new float[]{yaw, pitch};
209
    }
210
    public static boolean isBlockAboveHead(){
211
    	AxisAlignedBB bb =new AxisAlignedBB(mc.thePlayer.posX - 0.3, mc.thePlayer.posY+mc.thePlayer.getEyeHeight(), mc.thePlayer.posZ + 0.3,
212
 											mc.thePlayer.posX + 0.3, mc.thePlayer.posY+2.5 ,mc.thePlayer.posZ - 0.3);
213
 	  return !mc.theWorld.getCollidingBoundingBoxes(mc.thePlayer, bb).isEmpty();
214
    }
215
    public static boolean isCollidedH(double dist){
216
    	AxisAlignedBB bb =new AxisAlignedBB(mc.thePlayer.posX - 0.3, mc.thePlayer.posY+2, mc.thePlayer.posZ + 0.3,
217
											mc.thePlayer.posX + 0.3, mc.thePlayer.posY+3 ,mc.thePlayer.posZ - 0.3);
218
    	if (!mc.theWorld.getCollidingBoundingBoxes(mc.thePlayer, bb.offset(0.3 + dist, 0, 0)).isEmpty()) {
219
    		return true;
220
    	}else if (!mc.theWorld.getCollidingBoundingBoxes(mc.thePlayer, bb.offset(-0.3 - dist, 0, 0)).isEmpty()) {
221
    		return true;
222
    	}else if (!mc.theWorld.getCollidingBoundingBoxes(mc.thePlayer, bb.offset(0, 0, 0.3 + dist)).isEmpty()) {
223
    		return true;
224
    	}else if (!mc.theWorld.getCollidingBoundingBoxes(mc.thePlayer, bb.offset(0, 0, -0.3 - dist)).isEmpty()) {
225
    		return true;
226
	 	}
227
    	return false;
228
    }
229
    public static boolean isRealCollidedH(double dist){
230
		AxisAlignedBB bb =new AxisAlignedBB(mc.thePlayer.posX - 0.3, mc.thePlayer.posY + 0.5, mc.thePlayer.posZ + 0.3,
231
											mc.thePlayer.posX + 0.3, mc.thePlayer.posY+1.9 ,mc.thePlayer.posZ - 0.3);
232
		if (!mc.theWorld.getCollidingBoundingBoxes(mc.thePlayer, bb.offset(0.3 + dist, 0, 0)).isEmpty()) {
233
		  	return true;
234
	  	}else if (!mc.theWorld.getCollidingBoundingBoxes(mc.thePlayer, bb.offset(-0.3 - dist, 0, 0)).isEmpty()) {
235
		  	return true;
236
	  	}else if (!mc.theWorld.getCollidingBoundingBoxes(mc.thePlayer, bb.offset(0, 0, 0.3 + dist)).isEmpty()) {
237
		  return true;
238
	  	}else if (!mc.theWorld.getCollidingBoundingBoxes(mc.thePlayer, bb.offset(0, 0, -0.3 - dist)).isEmpty()) {
239
		  	return true;
240
	  	}
241
	  return false;
242
    }
243
}

What this file does

The attack gate and the Hover cycle both rely on MoveUtils.isOnGround(height): it ray-casts the player's bounding box downward by the given height and returns true when any collision box intersects - isOnGround(0.001) is a near-perfect ground probe that succeeds while standing and fails as soon as the feet leave the floor by more than a millimeter. The attack gate (line 168) uses it together with the vanilla onGround flag, and the Hover branch (line 98) calls it every pre-update to decide whether to run another lift stage. getJumpEffect() and getSpeedEffect() in the same file are the potion helpers the client's movement modules use.

anticheat Countering Checks

The anticheat code that detects or counters the techniques this module uses. Full source, with the detection mechanism explained below each box.

anticheat fight.Critical (critical-hit validation)

Critical.java133 lines · Java
1
/*
2
 * This program is free software: you can redistribute it and/or modify
3
 *   it under the terms of the GNU General Public License as published by
4
 *   the Free Software Foundation, either version 3 of the License, or
5
 *   (at your option) any later version.
6
 *
7
 *   This program is distributed in the hope that it will be useful,
8
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
9
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10
 *   GNU General Public License for more details.
11
 *
12
 *   You should have received a copy of the GNU General Public License
13
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
14
 */
15
package fr.neatmonster.nocheatplus.checks.fight;
16
17
import java.util.ArrayList;
18
import java.util.List;
19
20
import org.bukkit.Location;
21
import org.bukkit.entity.Player;
22
import org.bukkit.potion.PotionEffectType;
23
24
import fr.neatmonster.nocheatplus.NCPAPIProvider;
25
import fr.neatmonster.nocheatplus.actions.ParameterName;
26
import fr.neatmonster.nocheatplus.checks.Check;
27
import fr.neatmonster.nocheatplus.checks.CheckType;
28
import fr.neatmonster.nocheatplus.checks.ViolationData;
29
import fr.neatmonster.nocheatplus.checks.moving.MovingConfig;
30
import fr.neatmonster.nocheatplus.checks.moving.MovingData;
31
import fr.neatmonster.nocheatplus.checks.moving.model.PlayerMoveData;
32
import fr.neatmonster.nocheatplus.checks.moving.model.PlayerMoveInfo;
33
import fr.neatmonster.nocheatplus.checks.moving.velocity.VelocityFlags;
34
import fr.neatmonster.nocheatplus.compat.Bridge1_13;
35
import fr.neatmonster.nocheatplus.penalties.IPenaltyList;
36
import fr.neatmonster.nocheatplus.players.IPlayerData;
37
import fr.neatmonster.nocheatplus.utilities.StringUtil;
38
import fr.neatmonster.nocheatplus.utilities.map.BlockFlags;
39
import fr.neatmonster.nocheatplus.utilities.moving.AuxMoving;
40
import fr.neatmonster.nocheatplus.utilities.moving.MovingUtil;
41
42
/**
43
 * A check used to verify that critical hits done by players are legit.
44
 */
45
public class Critical extends Check {
46
    
47
    private final AuxMoving auxMoving = NCPAPIProvider.getNoCheatPlusAPI().getGenericInstance(AuxMoving.class);
48
    
49
    /**
50
     * Instantiates a new critical check.
51
     */
52
    public Critical() {
53
        super(CheckType.FIGHT_CRITICAL);
54
    }
55
    
56
    /**
57
     * Checks a player.
58
     * 
59
     * @param player
60
     * @param loc
61
     * @param data
62
     * @param cc
63
     * @param pData
64
     * @param penaltyList
65
     * @return true, if successful
66
     */
67
    public boolean check(final Player player, final Location loc, final FightData data, final FightConfig cc, 
68
                         final IPlayerData pData, final IPenaltyList penaltyList) {
69
        boolean cancel = false;
70
        final List<String> tags = new ArrayList<String>();
71
        final MovingData mData = pData.getGenericInstance(MovingData.class);
72
        final MovingConfig mCC = pData.getGenericInstance(MovingConfig.class);
73
        final PlayerMoveData thisMove = mData.playerMoves.getCurrentMove();
74
        final PlayerMoveData lastMove = mData.playerMoves.getFirstPastMove();
75
        final double mcFallDistance = (double) player.getFallDistance();
76
        final double ncpFallDistance = mData.noFallFallDistance;
77
        final double realisticFallDistance = MovingUtil.getRealisticFallDistance(player, thisMove.from.getY(), thisMove.to.getY(), mData, pData);
78
        final PlayerMoveInfo moveInfo = auxMoving.usePlayerMoveInfo();
79
        moveInfo.set(player, loc, null, mCC.yOnGround);
80
        
81
        // Check if the hit was a critical hit (fall distance is present, player is not on a ladder, not in vehicle, and without blindness effect).
82
        if (mcFallDistance > 0.0 && !player.isInsideVehicle() && !player.hasPotionEffect(PotionEffectType.BLINDNESS)) {
83
84
            if (pData.isDebugActive(type)) {
85
                debug(player, 
86
                    "Fall distances: MC(" + StringUtil.fdec3.format(mcFallDistance) +") | NCP("+ StringUtil.fdec3.format(ncpFallDistance) +") | R("+ StringUtil.fdec3.format(realisticFallDistance) +")"
87
                    + "\nfD diff: " + StringUtil.fdec3.format(Math.abs(ncpFallDistance - mcFallDistance))
88
                    + "\nJumpPhase: " + mData.sfJumpPhase + " | NCP onGround: " + (thisMove.from.onGround ? "ground -> " : "--- -> ") + (thisMove.to.onGround ? "ground" : "---") + " | MC onGround: " + player.isOnGround()
89
                ); // + ", packet onGround: " + packet.onGround); 
90
            }
91
            
92
            // Check for skipping conditions first.
93
            moveInfo.from.collectBlockFlags(0.4);
94
            // False positives with medium counts reset all nofall data when nearby boat
95
            // TODO: Fix isOnGroundDueToStandingOnAnEntity() to work on entity not nearby
96
            if (moveInfo.from.isOnGroundDueToStandingOnAnEntity()
97
                // Edge case with slime blocks
98
                || (moveInfo.from.getBlockFlags() & BlockFlags.F_BOUNCE25) != 0 && !moveInfo.from.isOnGround() && !moveInfo.to.isOnGround()) {
99
                auxMoving.returnPlayerMoveInfo(moveInfo);
100
                return false;
101
            }
102
            
103
            boolean isIllegal =
104
                       // 0: Don't allow players to perform critical hits in blocks where the game would reset fall distance (water, powder snow, bushes, webs, climbables)
105
                       moveInfo.from.isResetCond()
106
                       // 0: Same as above. The game resets fall distance with slowfall
107
                       || !Double.isInfinite(Bridge1_13.getSlowfallingAmplifier(player))
108
                       // 0: A full jump from ground requires more than 6 phases/events.
109
                       || mData.sfJumpPhase > 0 && mData.sfJumpPhase <= mData.liftOffEnvelope.getMaxJumpPhase(mData.jumpAmplifier) 
110
                       && !moveInfo.from.seekCollisionAbove(0.2) 
111
                       && (lastMove.verVelUsed.isEmpty() || !lastMove.verVelUsed.get(0).hasFlag(VelocityFlags.ORIGIN_BLOCK_BOUNCE))
112
                       // 0: Always invalidate critical hits if we judge the player to be on ground (given enough fall distance)
113
                       || Math.abs(ncpFallDistance - mcFallDistance) > 1e-5 && (moveInfo.from.isOnGround() || lastMove.touchedGroundWorkaround)
114
                       // (Let SurvivalFly catch low-jumps).
115
            ;
116
117
            // Handle violations
118
            if (isIllegal) {
119
                data.criticalVL += 1.0;
120
                // Execute whatever actions are associated with this check and 
121
                //  the violation level and find out if we should cancel the event.
122
                final ViolationData vd = new ViolationData(this, player, data.criticalVL, 1.0, cc.criticalActions);
123
                if (vd.needsParameters()) vd.setParameter(ParameterName.TAGS, StringUtil.join(tags, "+"));
124
                cancel = executeActions(vd).willCancel();
125
                // TODO: Introduce penalty instead of cancel.
126
            }
127
            // Crit was legit, reward the player.
128
            else data.criticalVL *= 0.96D;
129
        }
130
        auxMoving.returnPlayerMoveInfo(moveInfo);
131
        return cancel;
132
    }
133
}

How it counteracts this module

NCP's fight.Critical runs when the server sees a crit (mcFallDistance > 0) and applies three legality rules. The packet modes fail the divergence rule: NCP's own fall accounting (noFallFallDistance, tracked from ray-traced ground) says the player never left the ground, while the server-side fallDistance ticks up from the 0.0626 off-ground claims - the difference exceeds the 1e-5 tolerance while the player is judged on-ground, so data.criticalVL rises and the configured actions cancel the hit. Jump mode fails the jump-phase rule: a crit delivered while sfJumpPhase is between 1 and the lift-off envelope's max phase, with no ceiling above and no block-bounce velocity origin, is illegal because a full jump needs more than six move events - attacking on the first ticks of a jump is exactly what the rule is for. The reset-condition rule also denies crits from water, climbables and slow-fall.

anticheat Criticals (combat-side vertical check)

Criticals.java27 lines · Java
1
package me.vrekt.arc.check.combat;
2
3
import me.vrekt.arc.check.Check;
4
import me.vrekt.arc.check.CheckType;
5
import me.vrekt.arc.data.moving.MovingData;
6
import org.bukkit.entity.Player;
7
8
public class Criticals extends Check {
9
10
    public Criticals() {
11
        super(CheckType.CRITICALS);
12
    }
13
14
    public boolean check(Player player) {
15
16
        MovingData data = MovingData.getData(player);
17
        boolean onGround = data.isOnGround();
18
        if (onGround) {
19
            double vertical = data.getVerticalSpeed();
20
            // thats already impossible, lets check how high they 'jumped'.
21
            if (vertical < 0.37) {
22
                return checkViolation(player, "critical while onGround");
23
            }
24
        }
25
        return false;
26
    }
27
}

How it counteracts this module

Arc v2's Criticals check compares Arc's physics-derived ground state to the vertical speed at each attack: when data.isOnGround() is true and the vertical speed of the current move is below 0.37, the hit is 'critical while onGround'. The 0.0626 doCrits lift is a vertical speed of 0.0626, the HPacket extra lift is 1e-11, and the Hover decays are 5E-15 - orders of magnitude under the floor - while Arc's ground state, derived from LocationHelper ground tracking rather than the packet flag, still reports onGround. Only the Jump mode's real 0.42 jump clears the threshold, and it is handed to NCP's jump-phase rule instead. The module's groundTicks and isOnGround(0.001) client-side gates are irrelevant to a check that recomputes ground from the world.

anticheat SmallHop (mini-jump detection)

SmallHop.java60 lines · Java
1
/*
2
 * This file is part of Hawk Anticheat.
3
 * Copyright (C) 2018 Hawk Development Team
4
 *
5
 * This program is free software: you can redistribute it and/or modify
6
 * it under the terms of the GNU General Public License as published by
7
 * the Free Software Foundation, either version 3 of the License, or
8
 * (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
17
 */
18
19
package me.islandscout.hawk.check.movement.position;
20
21
import me.islandscout.hawk.HawkPlayer;
22
import me.islandscout.hawk.check.MovementCheck;
23
import me.islandscout.hawk.event.MoveEvent;
24
import me.islandscout.hawk.util.AdjacentBlocks;
25
import org.bukkit.Location;
26
import org.bukkit.Material;
27
28
/**
29
 * This check is used to flag clients whose jumps are too
30
 * small. Although insignificant at first glance, small jumps
31
 * can be exploited to bypass other checks such as speed and
32
 * criticals.
33
 */
34
public class SmallHop extends MovementCheck {
35
36
    //TODO: False flag in cobwebs
37
38
    public SmallHop() {
39
        super("smallhop", true, 0, 5, 0.99, 5000, "%player% failed small-hop, VL: %vl%", null);
40
    }
41
42
    @Override
43
    protected void check(MoveEvent e) {
44
        HawkPlayer pp = e.getHawkPlayer();
45
        double deltaY = e.isTeleportAccept() ? 0D : e.getTo().getY() - e.getFrom().getY();
46
        double prevDeltaY = pp.getVelocity().getY();
47
        boolean wasOnGround = pp.isOnGround();
48
        Location checkPos = e.getFrom().clone().add(0, 1, 0);
49
50
        if(!e.getPlayer().isFlying() && !e.hasAcceptedKnockback() && !e.isSlimeBlockBounce() && wasOnGround && deltaY > 0 && deltaY < 0.4 && prevDeltaY <= 0 &&
51
                !AdjacentBlocks.blockAdjacentIsSolid(checkPos) && !AdjacentBlocks.blockAdjacentIsSolid(checkPos.add(0, 1, 0)) && !AdjacentBlocks.blockAdjacentIsLiquid(checkPos.add(0, -1, 0)) &&
52
                !AdjacentBlocks.blockAdjacentIsLiquid(checkPos.add(0, -1, 0)) && !AdjacentBlocks.matIsAdjacent(e.getTo(), Material.LADDER, Material.VINE) &&
53
                !AdjacentBlocks.onGroundReally(e.getTo(), -1, false, 0.001, pp)) {
54
            punishAndTryRubberband(pp, e);
55
        }
56
        else {
57
            reward(pp);
58
        }
59
    }
60
}

How it counteracts this module

The 0.0626 doCrits hop is a SmallHop signature: wasOnGround, 0 < deltaY < 0.4, prevDeltaY <= 0, no accepted knockback, no slime bounce, no ladder/vine or adjacent solid, and the destination is not really on the ground (the feet sit 0.0626 above the floor) - punish and rubberband. The Hover stage-1/2 decays are sub-tolerance by design, but every Hover stage that moves outside AdjacentBlocks.onGroundReally's 0.001 tolerance is caught, and a rubberband mid-cycle zeroes the module's stage through its own S08 handler, resetting the lift. The Mini/HMini C06 with onGround true over air is handled by the ground-truth checks rather than this one.

anticheat NoFall (ground-spoof family check)

NoFall.java100 lines · Java
1
package ac.grim.grimac.checks.impl.groundspoof;
2
3
import ac.grim.grimac.checks.Check;
4
import ac.grim.grimac.checks.CheckData;
5
import ac.grim.grimac.checks.type.PacketReceiveListener;
6
import ac.grim.grimac.player.GrimPlayer;
7
import ac.grim.grimac.predictionengine.GhostBlockDetector;
8
import ac.grim.grimac.utils.collisions.datatypes.SimpleCollisionBox;
9
import ac.grim.grimac.utils.nmsutil.Collisions;
10
import ac.grim.grimac.utils.nmsutil.GetBoundingBox;
11
import com.github.retrooper.packetevents.event.PacketReceiveEvent;
12
import com.github.retrooper.packetevents.protocol.packettype.PacketType;
13
import com.github.retrooper.packetevents.wrapper.play.client.WrapperPlayClientPlayerFlying;
14
15
import java.util.ArrayList;
16
import java.util.List;
17
18
// Catches NoFalls for LOOK and GROUND packets
19
// This check runs AFTER the predictions
20
@CheckData(name = "NoFall", stableKey = "grim.groundspoof.no_fall", description = "Sent an on-ground packet while not colliding with the ground", setback = 10)
21
public class NoFall extends Check implements PacketReceiveListener {
22
23
    public boolean flipPlayerGroundStatus = false;
24
25
    public NoFall(GrimPlayer player) {
26
        super(player);
27
    }
28
29
    @Override
30
    public void onPacketReceive(PacketReceiveEvent event) {
31
        if (event.getPacketType() == PacketType.Play.Client.PLAYER_FLYING || event.getPacketType() == PacketType.Play.Client.PLAYER_ROTATION) {
32
            // The player hasn't spawned yet
33
            if (player.getSetbackTeleportUtil().insideUnloadedChunk()) return;
34
            // The player has already been flagged, and
35
            if (player.getSetbackTeleportUtil().blockOffsets) return;
36
37
            WrapperPlayClientPlayerFlying wrapper = new WrapperPlayClientPlayerFlying(event);
38
39
            // If the player claims to be on the ground
40
            // Run this code IFF the player doesn't send the position, as that won't get processed by predictions
41
            if (wrapper.isOnGround() && !wrapper.hasPositionChanged()) {
42
                if (!isNearGround(wrapper.isOnGround())) { // If player isn't near ground
43
                    // 1.8 boats have a mind on their own... only flag if they're not near a boat or are on 1.9+
44
                    if (!GhostBlockDetector.isGhostBlock(player)) flagWithSetback();
45
                    if (shouldModifyPackets()) {
46
                        wrapper.setOnGround(false);
47
                        event.markForReEncode(true);
48
                    }
49
                }
50
            }
51
        }
52
53
        if (WrapperPlayClientPlayerFlying.isFlying(event.getPacketType())) {
54
            WrapperPlayClientPlayerFlying wrapper = new WrapperPlayClientPlayerFlying(event);
55
            // The prediction based NoFall check (that runs before us without the packet)
56
            // has asked us to flip the player's onGround status
57
            // This happens to make both checks use the same logic... and
58
            // since we don't have access to modify the packet with prediction based checks
59
            // I could add that feature but ehh... this works and is better anyway.
60
            //
61
            // Also flip teleports because I don't trust vanilla's handling of teleports and ground
62
            if (flipPlayerGroundStatus) {
63
                flipPlayerGroundStatus = false;
64
                if (shouldModifyPackets()) {
65
                    wrapper.setOnGround(!wrapper.isOnGround());
66
                    event.markForReEncode(true);
67
                }
68
            }
69
            if (player.packetStateData.lastPacketWasTeleport) {
70
                if (shouldModifyPackets()) {
71
                    wrapper.setOnGround(false);
72
                    event.markForReEncode(true);
73
                }
74
            }
75
        }
76
    }
77
78
    private boolean isNearGround(boolean onGround) {
79
        if (onGround) {
80
            SimpleCollisionBox feetBB = GetBoundingBox.getBoundingBoxFromPosAndSize(player, player.x, player.y, player.z, 0.6f, 0.001f);
81
            feetBB.expand(player.getMovementThreshold()); // Movement threshold can be in any direction
82
83
            return checkForBoxes(feetBB);
84
        }
85
        return true;
86
    }
87
88
    private boolean checkForBoxes(SimpleCollisionBox playerBB) {
89
        List<SimpleCollisionBox> boxes = new ArrayList<>();
90
        Collisions.getCollisionBoxes(player, playerBB, boxes, false);
91
92
        for (SimpleCollisionBox box : boxes) {
93
            if (playerBB.collidesVertically(box)) { // If we collide vertically but aren't in the block
94
                return true;
95
            }
96
        }
97
98
        return player.compensatedWorld.isNearHardEntity(playerBB.copy().expand(4));
99
    }
100
}

How it counteracts this module

Grim's NoFall is the ground-spoof family check: on any PLAYER_FLYING/ROTATION packet that claims onGround true without a position change, it ray-casts a 0.001-tall feet box expanded by the movement threshold and flags with setback (10) if nothing collides vertically, rewriting the packet to onGround false. The Minis/HMinis branch is the direct target: it injects C06 packets with onGround true precisely when the player is not on the ground (the source comment says as much - 'if minis criticals is not on ground, send packet onground to be able to jump'), and Grim's isNearGround test answers with the actual block collision. The Hover mode's y + 1E-8 onGround-true claim sits inside the movement-threshold expansion and is accepted; the check only bites on claims that are genuinely airborne, which is exactly the lie the Minis/HMinis C06 tells.

← Back to Analysis Hub