Fixed FullFlight/NoClip (#254)
This commit is contained in:
24
src/main/java/anticope/rejects/mixin/MixinEntity.java
Normal file
24
src/main/java/anticope/rejects/mixin/MixinEntity.java
Normal file
@@ -0,0 +1,24 @@
|
||||
package anticope.rejects.mixin;
|
||||
|
||||
import meteordevelopment.meteorclient.systems.modules.Modules;
|
||||
import anticope.rejects.modules.FullFlight;
|
||||
import anticope.rejects.modules.FullNoClip;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.block.BlockState;
|
||||
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.callback.CallbackInfo;
|
||||
|
||||
import static meteordevelopment.meteorclient.MeteorClient.mc;
|
||||
|
||||
@Mixin(Entity.class)
|
||||
public abstract class MixinEntity {
|
||||
@Inject(method = "slowMovement", at = @At("HEAD"), cancellable = true)
|
||||
public void slowMovement(BlockState blockState, Vec3d multiplier, CallbackInfo ci) {
|
||||
if (Modules.get().isActive(FullFlight.class) || Modules.get().isActive(FullNoClip.class)) ci.cancel();
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package anticope.rejects.modules;
|
||||
|
||||
import anticope.rejects.MeteorRejectsAddon;
|
||||
import meteordevelopment.meteorclient.events.world.CollisionShapeEvent;
|
||||
import meteordevelopment.meteorclient.events.entity.player.PlayerMoveEvent;
|
||||
import meteordevelopment.meteorclient.mixininterface.IVec3d;
|
||||
import meteordevelopment.meteorclient.systems.modules.Module;
|
||||
@@ -32,12 +31,6 @@ public class FullNoClip extends Module {
|
||||
public FullNoClip() {
|
||||
super(MeteorRejectsAddon.CATEGORY, "fullnoclip", "FullNoClip.");
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
private void onCollision(CollisionShapeEvent event) {
|
||||
if (mc.player.getVehicle() == null)
|
||||
event.shape = VoxelShapes.empty();
|
||||
}
|
||||
|
||||
private double getDir() {
|
||||
double dir = 0;
|
||||
|
||||
Reference in New Issue
Block a user