Fixed FullFlight/NoClip (#254)
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
package anticope.rejects.mixin;
|
||||
|
||||
import anticope.rejects.events.OffGroundSpeedEvent;
|
||||
import anticope.rejects.modules.FullNoClip;
|
||||
import meteordevelopment.meteorclient.systems.modules.Modules;
|
||||
import meteordevelopment.meteorclient.MeteorClient;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
@Mixin(PlayerEntity.class)
|
||||
@@ -14,4 +17,8 @@ public class PlayerEntityMixin {
|
||||
private void onGetOffGroundSpeed(CallbackInfoReturnable<Float> cir) {
|
||||
cir.setReturnValue(MeteorClient.EVENT_BUS.post(OffGroundSpeedEvent.get(cir.getReturnValueF())).speed);
|
||||
}
|
||||
@Redirect(method = {"tick", "updatePose"}, at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/PlayerEntity;isSpectator()Z"))
|
||||
private boolean FullNoClip(PlayerEntity player) {
|
||||
return Modules.get().isActive(FullNoClip.class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user