fix coping issue
This commit is contained in:
@@ -53,7 +53,6 @@
|
||||
- ObsidianFarm (Taken from [Meteor ObsidianFarm Addon](https://github.com/VoidCyborg/meteor-obsidian-farm))
|
||||
- PacketFly (Taken from an [unmerged PR](https://github.com/MeteorDevelopment/meteor-client/pull/813))
|
||||
- Painter
|
||||
- Phase
|
||||
- Prone (Taken from an [unmerged PR](https://github.com/MeteorDevelopment/meteor-client/pull/1423))
|
||||
- Rendering
|
||||
- SkeletonESP (Ported from [JexClient](https://github.com/DustinRepo/JexClient-main/blob/main/src/main/java/me/dustin/jex/feature/mod/impl/render/Skeletons.java))
|
||||
|
||||
@@ -62,7 +62,6 @@ public class MeteorRejectsAddon extends MeteorAddon {
|
||||
modules.add(new ObsidianFarm());
|
||||
modules.add(new PacketFly());
|
||||
modules.add(new Painter());
|
||||
modules.add(new Phase());
|
||||
modules.add(new Prone());
|
||||
modules.add(new Rendering());
|
||||
modules.add(new SkeletonESP());
|
||||
|
||||
@@ -20,16 +20,16 @@ import java.util.Map;
|
||||
|
||||
@Mixin(Commands.class)
|
||||
public class CommandsMixin {
|
||||
@Shadow
|
||||
@Shadow(remap = false)
|
||||
@Final
|
||||
private List<Command> commands;
|
||||
|
||||
@Shadow
|
||||
@Shadow(remap = false)
|
||||
@Final
|
||||
private Map<Class<? extends Command>, Command> commandInstances;
|
||||
|
||||
|
||||
@Shadow
|
||||
@Shadow(remap = false)
|
||||
@Final
|
||||
private CommandDispatcher<CommandSource> DISPATCHER = new CommandDispatcher<>();
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
@Mixin(ConfigTab.class)
|
||||
public class ConfigTabMixin {
|
||||
@Shadow
|
||||
@Shadow(remap = false)
|
||||
@Final
|
||||
private static Settings settings;
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import meteordevelopment.meteorclient.systems.modules.Modules;
|
||||
|
||||
@Mixin(Modules.class)
|
||||
public class ModulesMixin {
|
||||
@Shadow
|
||||
@Shadow(remap = false)
|
||||
@Final
|
||||
private Map<Category, List<Module>> groups;
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import static meteordevelopment.meteorclient.MeteorClient.mc;
|
||||
|
||||
@Mixin(Flight.class)
|
||||
public class FlightMixin {
|
||||
@Shadow
|
||||
@Shadow(remap = false)
|
||||
@Final
|
||||
private SettingGroup sgGeneral;
|
||||
|
||||
|
||||
@@ -1,159 +0,0 @@
|
||||
package anticope.rejects.modules;
|
||||
|
||||
import anticope.rejects.MeteorRejectsAddon;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.shape.VoxelShapes;
|
||||
|
||||
import meteordevelopment.meteorclient.events.world.CollisionShapeEvent;
|
||||
import meteordevelopment.meteorclient.events.world.TickEvent;
|
||||
import meteordevelopment.meteorclient.settings.DoubleSetting;
|
||||
import meteordevelopment.meteorclient.settings.EnumSetting;
|
||||
import meteordevelopment.meteorclient.settings.Setting;
|
||||
import meteordevelopment.meteorclient.settings.SettingGroup;
|
||||
import meteordevelopment.meteorclient.systems.modules.Module;
|
||||
import meteordevelopment.orbit.EventHandler;
|
||||
|
||||
public class Phase extends Module {
|
||||
|
||||
private final SettingGroup sgGeneral = settings.getDefaultGroup();
|
||||
|
||||
private final Setting<Mode> mode = sgGeneral.add(new EnumSetting.Builder<Mode>()
|
||||
.name("mode")
|
||||
.description("The phase mode used.")
|
||||
.defaultValue(Mode.NRNB)
|
||||
.onChanged(v -> { setPos(); })
|
||||
.build()
|
||||
);
|
||||
|
||||
private final Setting<Double> distance = sgGeneral.add(new DoubleSetting.Builder()
|
||||
.name("speed")
|
||||
.description("The X and Z distance per clip.")
|
||||
.defaultValue(0.1)
|
||||
.min(0.0)
|
||||
.sliderMin(0.0)
|
||||
.sliderMax(10.0)
|
||||
.visible(() -> (mode.get() != Mode.CollisionShape))
|
||||
.build()
|
||||
);
|
||||
|
||||
|
||||
private double prevX = Double.NaN;
|
||||
private double prevZ = Double.NaN;
|
||||
|
||||
public Phase() {
|
||||
super(MeteorRejectsAddon.CATEGORY, "phase", "Lets you clip through ground sometimes.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivate() {
|
||||
if (mc.player == null) return;
|
||||
setPos();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDeactivate() {
|
||||
prevX = Double.NaN;
|
||||
prevZ = Double.NaN;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
private void onCollisionShape(CollisionShapeEvent event) {
|
||||
if (mc.world == null || mc.player == null) return;
|
||||
if (mode.get() != Mode.CollisionShape) return;
|
||||
if (event == null || event.pos == null) return;
|
||||
if (event.type != CollisionShapeEvent.CollisionType.BLOCK) return;
|
||||
if (event.pos.getY() < mc.player.getY()) {
|
||||
if (mc.player.isSneaking()) {
|
||||
event.shape = VoxelShapes.empty();
|
||||
}
|
||||
} else {
|
||||
event.shape = VoxelShapes.empty();
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
private void onTick(TickEvent.Post post) {
|
||||
if (mode.get() == Mode.CollisionShape) return;
|
||||
if (mc.player == null) return;
|
||||
|
||||
if (Double.isNaN(prevX) || Double.isNaN(prevZ)) setPos();
|
||||
|
||||
Vec3d yawForward = Vec3d.fromPolar((float)0.0f, (float)mc.player.getYaw());
|
||||
Vec3d yawBack = Vec3d.fromPolar((float)0.0f, (float)mc.player.getYaw() - 180f);
|
||||
Vec3d yawLeft = Vec3d.fromPolar((float)0.0f, (float)mc.player.getYaw() - 90f);
|
||||
Vec3d yawRight = Vec3d.fromPolar((float)0.0f, (float)mc.player.getYaw() - 270f);
|
||||
|
||||
if (mode.get() == Mode.Normal) {
|
||||
|
||||
if (mc.options.keyForward.isPressed()) {
|
||||
mc.player.setPos(
|
||||
mc.player.getX() + yawForward.x * distance.get(),
|
||||
mc.player.getY(),
|
||||
mc.player.getZ() + yawForward.z * distance.get()
|
||||
);
|
||||
}
|
||||
|
||||
if (mc.options.keyBack.isPressed()) {
|
||||
mc.player.setPos(
|
||||
mc.player.getX() + yawBack.x * distance.get(),
|
||||
mc.player.getY(),
|
||||
mc.player.getZ() + yawBack.z * distance.get()
|
||||
);
|
||||
}
|
||||
|
||||
if (mc.options.keyLeft.isPressed()) {
|
||||
mc.player.setPos(
|
||||
mc.player.getX() + yawLeft.x * distance.get(),
|
||||
mc.player.getY(),
|
||||
mc.player.getZ() + yawLeft.z * distance.get()
|
||||
);
|
||||
}
|
||||
|
||||
if (mc.options.keyRight.isPressed()) {
|
||||
mc.player.setPos(
|
||||
mc.player.getX() + yawRight.x * distance.get(),
|
||||
mc.player.getY(),
|
||||
mc.player.getZ() + yawRight.z * distance.get()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
else if (mode.get() == Mode.NRNB) {
|
||||
if (mc.options.keyForward.isPressed()) {
|
||||
prevX += yawForward.x * distance.get();
|
||||
prevZ += yawForward.z * distance.get();
|
||||
mc.player.setPos(prevX, mc.player.getY(), prevZ);
|
||||
}
|
||||
|
||||
if (mc.options.keyBack.isPressed()) {
|
||||
prevX += yawBack.x * distance.get();
|
||||
prevZ += yawBack.z * distance.get();
|
||||
mc.player.setPos(prevX, mc.player.getY(), prevZ);
|
||||
}
|
||||
|
||||
if (mc.options.keyLeft.isPressed()) {
|
||||
prevX += yawLeft.x * distance.get();
|
||||
prevZ += yawLeft.z * distance.get();
|
||||
mc.player.setPos(prevX, mc.player.getY(), prevZ);
|
||||
}
|
||||
|
||||
if (mc.options.keyRight.isPressed()) {
|
||||
prevX += yawRight.x * distance.get();
|
||||
prevZ += yawRight.z * distance.get();
|
||||
mc.player.setPos(prevX, mc.player.getY(), prevZ);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void setPos() {
|
||||
if (mc.player == null) return;
|
||||
prevX = mc.player.getX();
|
||||
prevZ = mc.player.getZ();
|
||||
}
|
||||
|
||||
public static enum Mode {
|
||||
NRNB,
|
||||
Normal,
|
||||
CollisionShape
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user