fix coping issue

This commit is contained in:
C10udburst
2022-01-01 16:10:29 +01:00
parent 82c863fce7
commit fe87508fa3
7 changed files with 6 additions and 167 deletions

View File

@@ -53,7 +53,6 @@
- ObsidianFarm (Taken from [Meteor ObsidianFarm Addon](https://github.com/VoidCyborg/meteor-obsidian-farm)) - 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)) - PacketFly (Taken from an [unmerged PR](https://github.com/MeteorDevelopment/meteor-client/pull/813))
- Painter - Painter
- Phase
- Prone (Taken from an [unmerged PR](https://github.com/MeteorDevelopment/meteor-client/pull/1423)) - Prone (Taken from an [unmerged PR](https://github.com/MeteorDevelopment/meteor-client/pull/1423))
- Rendering - 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)) - SkeletonESP (Ported from [JexClient](https://github.com/DustinRepo/JexClient-main/blob/main/src/main/java/me/dustin/jex/feature/mod/impl/render/Skeletons.java))

View File

@@ -62,7 +62,6 @@ public class MeteorRejectsAddon extends MeteorAddon {
modules.add(new ObsidianFarm()); modules.add(new ObsidianFarm());
modules.add(new PacketFly()); modules.add(new PacketFly());
modules.add(new Painter()); modules.add(new Painter());
modules.add(new Phase());
modules.add(new Prone()); modules.add(new Prone());
modules.add(new Rendering()); modules.add(new Rendering());
modules.add(new SkeletonESP()); modules.add(new SkeletonESP());

View File

@@ -20,16 +20,16 @@ import java.util.Map;
@Mixin(Commands.class) @Mixin(Commands.class)
public class CommandsMixin { public class CommandsMixin {
@Shadow @Shadow(remap = false)
@Final @Final
private List<Command> commands; private List<Command> commands;
@Shadow @Shadow(remap = false)
@Final @Final
private Map<Class<? extends Command>, Command> commandInstances; private Map<Class<? extends Command>, Command> commandInstances;
@Shadow @Shadow(remap = false)
@Final @Final
private CommandDispatcher<CommandSource> DISPATCHER = new CommandDispatcher<>(); private CommandDispatcher<CommandSource> DISPATCHER = new CommandDispatcher<>();

View File

@@ -15,7 +15,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(ConfigTab.class) @Mixin(ConfigTab.class)
public class ConfigTabMixin { public class ConfigTabMixin {
@Shadow @Shadow(remap = false)
@Final @Final
private static Settings settings; private static Settings settings;

View File

@@ -19,7 +19,7 @@ import meteordevelopment.meteorclient.systems.modules.Modules;
@Mixin(Modules.class) @Mixin(Modules.class)
public class ModulesMixin { public class ModulesMixin {
@Shadow @Shadow(remap = false)
@Final @Final
private Map<Category, List<Module>> groups; private Map<Category, List<Module>> groups;

View File

@@ -18,7 +18,7 @@ import static meteordevelopment.meteorclient.MeteorClient.mc;
@Mixin(Flight.class) @Mixin(Flight.class)
public class FlightMixin { public class FlightMixin {
@Shadow @Shadow(remap = false)
@Final @Final
private SettingGroup sgGeneral; private SettingGroup sgGeneral;

View File

@@ -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
}
}