File tree Expand file tree Collapse file tree
src/main/java/net/wurstclient Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,5 +20,6 @@ public NoLevitationHack()
2020 setCategory (Category .MOVEMENT );
2121 }
2222
23- // See ClientPlayerEntityMixin.hasStatusEffect()
23+ // See ClientPlayerEntityMixin.hasStatusEffect() and
24+ // ClientPlayerEntityMixin.getStatusEffect()
2425}
Original file line number Diff line number Diff line change 2828import net .minecraft .client .world .ClientWorld ;
2929import net .minecraft .entity .MovementType ;
3030import net .minecraft .entity .effect .StatusEffect ;
31+ import net .minecraft .entity .effect .StatusEffectInstance ;
3132import net .minecraft .entity .effect .StatusEffects ;
3233import net .minecraft .registry .entry .RegistryEntry ;
3334import net .minecraft .util .math .Vec3d ;
@@ -284,6 +285,19 @@ public boolean hasStatusEffect(RegistryEntry<StatusEffect> effect)
284285 return super .hasStatusEffect (effect );
285286 }
286287
288+ @ Override
289+ public StatusEffectInstance getStatusEffect (
290+ RegistryEntry <StatusEffect > effect )
291+ {
292+ HackList hax = WurstClient .INSTANCE .getHax ();
293+
294+ if (effect == StatusEffects .LEVITATION
295+ && hax .noLevitationHack .isEnabled ())
296+ return null ;
297+
298+ return super .getStatusEffect (effect );
299+ }
300+
287301 @ Override
288302 public float getStepHeight ()
289303 {
You can’t perform that action at this time.
0 commit comments