From 7b5104a062b3c393c6f26350726c9711aac799b2 Mon Sep 17 00:00:00 2001 From: winterflyt <36+winterflyt@noreply.skidsolutions.xyz> Date: Mon, 30 Nov 2026 05:55:13 +0200 Subject: [PATCH] Upload files to "src/openonyx/features/player/internal/group_m/internal" --- .../group_m/internal/JumpAimMode.java | 27 ++++++ .../group_m/internal/ScaffoldDown.java | 41 +++++++++ .../group_m/internal/ScaffoldSneak.java | 64 ++++++++++++++ .../group_m/internal/ScaffoldStabilizer.java | 81 ++++++++++++++++++ .../group_m/internal/ScaffoldTelly.java | 84 +++++++++++++++++++ 5 files changed, 297 insertions(+) create mode 100644 src/openonyx/features/player/internal/group_m/internal/JumpAimMode.java create mode 100644 src/openonyx/features/player/internal/group_m/internal/ScaffoldDown.java create mode 100644 src/openonyx/features/player/internal/group_m/internal/ScaffoldSneak.java create mode 100644 src/openonyx/features/player/internal/group_m/internal/ScaffoldStabilizer.java create mode 100644 src/openonyx/features/player/internal/group_m/internal/ScaffoldTelly.java diff --git a/src/openonyx/features/player/internal/group_m/internal/JumpAimMode.java b/src/openonyx/features/player/internal/group_m/internal/JumpAimMode.java new file mode 100644 index 0000000..fa29f69 --- /dev/null +++ b/src/openonyx/features/player/internal/group_m/internal/JumpAimMode.java @@ -0,0 +1,27 @@ +package openonyx.features.player.internal.group_m.internal; + +import openonyx.history.DisplayNamed; + +public enum JumpAimMode implements DisplayNamed { + REVERSE("Look down"), + RESET("Free look"); + + private final String f; + + @Override + public String getDisplayName() { + return this.f; + } + + private static JumpAimMode[] L() { + JumpAimMode[] jumpAimModes = new JumpAimMode[2]; + boolean bl = true; + jumpAimModes[0] = REVERSE; + jumpAimModes[1] = RESET; + return jumpAimModes; + } + + JumpAimMode(String string1) { + this.f = string1; + } +} diff --git a/src/openonyx/features/player/internal/group_m/internal/ScaffoldDown.java b/src/openonyx/features/player/internal/group_m/internal/ScaffoldDown.java new file mode 100644 index 0000000..35e0c36 --- /dev/null +++ b/src/openonyx/features/player/internal/group_m/internal/ScaffoldDown.java @@ -0,0 +1,41 @@ +package openonyx.features.player.internal.group_m.internal; + +import meteordevelopment.orbit.EventHandler; +import net.minecraft.util.BlockPos; +import openonyx.configuration.internal.MovementInputEvent; +import openonyx.configuration.internal.SafeWalkEvent; +import openonyx.core.MinecraftAccess; +import openonyx.history.Setting; +import openonyx.history.SettingSection; +import openonyx.interaction.BlockUtils; + +public class ScaffoldDown extends SettingSection implements MinecraftAccess { + public static final ScaffoldDown INSTANCE = new ScaffoldDown(); + + private ScaffoldDown() { + super("Down", false); + this.visibleWhen(Setting.BOOLEAN_SUPPLIER); + } + + public static boolean l() { + return mc.thePlayer == null ? false : h() && BlockUtils.L(new BlockPos(mc.thePlayer).add(0, -2, 0)); + } + + public static boolean h() { + return INSTANCE.isEnabled() && mc.gameSettings.keyBindSneak.isKeyDown(); + } + + @EventHandler(priority = -100) + private void onSafeWalk(SafeWalkEvent safeWalkEvent) { + if (l()) { + safeWalkEvent.L(false); + } + } + + @EventHandler(priority = -100) + private void onMovementInput(MovementInputEvent movementInputEvent) { + if (l()) { + movementInputEvent.d(false); + } + } +} diff --git a/src/openonyx/features/player/internal/group_m/internal/ScaffoldSneak.java b/src/openonyx/features/player/internal/group_m/internal/ScaffoldSneak.java new file mode 100644 index 0000000..ce498bd --- /dev/null +++ b/src/openonyx/features/player/internal/group_m/internal/ScaffoldSneak.java @@ -0,0 +1,64 @@ +package openonyx.features.player.internal.group_m.internal; + +import meteordevelopment.orbit.EventHandler; +import openonyx.configuration.internal.MovementInputEvent; +import openonyx.core.MinecraftAccess; +import openonyx.history.RangeRoll; +import openonyx.history.SettingSection; +import openonyx.history.internal.BooleanSetting; +import openonyx.history.internal.RangeSetting; +import openonyx.utilities.MovementInputState; +import openonyx.utilities.PlayerUtils; + +public class ScaffoldSneak extends SettingSection implements MinecraftAccess { + private final transient RangeRoll rangeRoll; + private transient int I; + public RangeSetting howManyBlocksToPlaceBetweenSneaks = RangeSetting.ofInt("Blocks to sneak", 0, 0, 0, 10) + .describe("How many blocks to place between sneaks"); + private final transient RangeRoll rangeRoll2; + public RangeSetting blocks = RangeSetting.of("Edge distance", 0.01, 0.05, 0.01, 1.3).withSuffix(" blocks"); + public BooleanSetting onlyOnGround = new BooleanSetting("Only on ground", true); + public static final ScaffoldSneak INSTANCE = new ScaffoldSneak(); + + public void i() { + if (this.isEnabled()) { + this.I++; + if (this.I > this.rangeRoll2.L()) { + this.I = 0; + this.rangeRoll2.L(); + this.rangeRoll.L(); + } + } + } + + @EventHandler(priority = -50) + private void onMovementInput(MovementInputEvent movementInputEvent) { + if (!movementInputEvent.d() && this.L(movementInputEvent.getMovementInputState())) { + movementInputEvent.d(true); + } + } + + private ScaffoldSneak() { + super("Sneak", false); + this.rangeRoll2 = new RangeRoll(this.howManyBlocksToPlaceBetweenSneaks); + this.rangeRoll = new RangeRoll(this.blocks); + } + + public boolean L(MovementInputState movementInputState) { + ScaffoldSneak scaffoldSneak1 = this; + if (mc.thePlayer == null) { + return false; + } + + if (ScaffoldDown.l()) { + return false; + } + + if (!mc.thePlayer.onGround && scaffoldSneak1.onlyOnGround.getValue()) { + return false; + } + + boolean bl = !mc.thePlayer.capabilities.isFlying && scaffoldSneak1.I == 0; + return bl && PlayerUtils.L(mc.thePlayer, movementInputState, scaffoldSneak1.rangeRoll.L()); + } +} diff --git a/src/openonyx/features/player/internal/group_m/internal/ScaffoldStabilizer.java b/src/openonyx/features/player/internal/group_m/internal/ScaffoldStabilizer.java new file mode 100644 index 0000000..fe42b3e --- /dev/null +++ b/src/openonyx/features/player/internal/group_m/internal/ScaffoldStabilizer.java @@ -0,0 +1,81 @@ +package openonyx.features.player.internal.group_m.internal; + +import meteordevelopment.orbit.EventHandler; +import net.minecraft.entity.Entity; +import net.minecraft.util.Vec3; +import openonyx.configuration.internal.MovementInputEvent; +import openonyx.core.MinecraftAccess; +import openonyx.features.player.Scaffold; +import openonyx.history.SettingSection; +import openonyx.utilities.EdgeCollision; +import openonyx.utilities.MovementInputState; +import openonyx.utilities.PlayerUtils; +import openonyx.utilities.VecUtils; +import openonyx.utilities.internal.Line3; + +public class ScaffoldStabilizer extends SettingSection implements MinecraftAccess { + private static final double f = 0.075; + public static final ScaffoldStabilizer INSTANCE = new ScaffoldStabilizer(); + private static final double e = 0.2; + + private ScaffoldStabilizer() { + super("Stabilize movement", true); + } + + @EventHandler(priority = -10) + private void onMovementInput(MovementInputEvent movementInputEvent) { + if (mc.thePlayer != null) { + if (!movementInputEvent.D() || !mc.thePlayer.onGround) { + Line3 line3; + if ((line3 = Scaffold.INSTANCE.getLine3()) != null) { + MovementInputState movementInputState = movementInputEvent.getMovementInputState(); + Vec3 vec3 = PlayerUtils.D((Entity)mc.thePlayer); + Vec3 vec33; + Vec3 vec31 = (vec33 = line3.L(vec3)).subtract(vec3); + Vec3 vec32 = VecUtils.i(PlayerUtils.L((Entity)mc.thePlayer), 0.0); + boolean bl1 = vec31.dotProduct(vec32) > 0.0; + double d = bl1 ? 0.075 : 0.2; + if (!(vec33.distanceToSqr(vec3) < d * d)) { + float fx = EdgeCollision.L(vec33.subtract(vec3), mc.thePlayer.rotationYaw); + MovementInputState movementInputState1 = EdgeCollision.L(MovementInputState.INSTANCE8, fx, 0.0F); + boolean bl = movementInputState.forwards() || movementInputState.backwards(); + boolean bl2 = movementInputState.right() || movementInputState.left(); + MovementInputState movementInputState2 = new MovementInputState; + boolean bl3; + boolean bl4; + if (bl) { + bl3 = movementInputState.forwards(); + bl4 = bl; + } else { + bl3 = movementInputState1.forwards(); + bl4 = bl; + } + + boolean bl5; + if (bl4) { + bl4 = movementInputState.backwards(); + bl5 = bl2; + } else { + bl4 = movementInputState1.backwards(); + bl5 = bl2; + } + + boolean bl6; + if (bl5) { + bl5 = movementInputState.left(); + bl6 = bl2; + } else { + bl5 = movementInputState1.left(); + bl6 = bl2; + } + + movementInputState2./* $VF: Unable to resugar constructor */( + bl3, bl4, bl5, bl6 ? movementInputState.right() : movementInputState1.right() + ); + movementInputEvent.L(movementInputState2); + } + } + } + } + } +} diff --git a/src/openonyx/features/player/internal/group_m/internal/ScaffoldTelly.java b/src/openonyx/features/player/internal/group_m/internal/ScaffoldTelly.java new file mode 100644 index 0000000..057dbb9 --- /dev/null +++ b/src/openonyx/features/player/internal/group_m/internal/ScaffoldTelly.java @@ -0,0 +1,84 @@ +package openonyx.features.player.internal.group_m.internal; + +import meteordevelopment.orbit.EventHandler; +import openonyx.configuration.internal.MovementInputEvent; +import openonyx.configuration.internal.PostJumpEvent; +import openonyx.configuration.internal.PreTickEvent; +import openonyx.core.MinecraftAccess; +import openonyx.features.player.Scaffold; +import openonyx.history.SettingSection; +import openonyx.history.internal.EnumSetting; +import openonyx.history.internal.NumberSetting; +import openonyx.history.internal.RangeSetting; +import openonyx.protocol.RotationHandler; +import openonyx.utilities.PlayerUtils; + +public class ScaffoldTelly extends SettingSection implements MinecraftAccess { + private transient int I; + private transient int d; + public RangeSetting ticks; + public static final ScaffoldTelly INSTANCE = new ScaffoldTelly(); + public NumberSetting straightTicks; + public EnumSetting jumpAim = new EnumSetting<>("Jump aim", JumpAimMode.RESET) + .describe("What the aim does while the jump goes out: keep the spoofed aim pitched down, or hand it back to your real look"); + + private ScaffoldTelly() { + super("Telly", false); + this.straightTicks = new NumberSetting("Straight ticks", 0.0, 0.0, 5.0, 1.0) + .withSuffix(" ticks") + .describe("Air ticks after the jump during which the aim stays straight ahead"); + this.ticks = RangeSetting.ofInt("Jump delay", 0, 0, 0, 10).withSuffix(" ticks").describe("Ground ticks to wait between jumps"); + this.d = this.ticks.randomInt(); + } + + @EventHandler + private void onPreTick(PreTickEvent preTickEvent) { + if (mc.thePlayer != null) { + if (mc.thePlayer.onGround) { + this.I++; + } + } + } + + public boolean l() { + return PlayerUtils.L(mc.thePlayer) <= this.straightTicks.getInt() && this.I >= this.d; + } + + public boolean h() { + return this.I >= this.d && PlayerUtils.L(mc.thePlayer) && this.isEnabled(); + } + + @EventHandler + private void onPostJump(PostJumpEvent postJumpEvent) { + this.I = 0; + this.d = this.ticks.randomInt(); + } + + @Override + protected void D() { + this.I = 0; + this.d = this.ticks.randomInt(); + } + + @EventHandler + private void onMovementInput(MovementInputEvent movementInputEvent) { + ScaffoldTelly scaffoldTelly1 = this; + if (mc.thePlayer != null) { + if (PlayerUtils.L(mc.thePlayer) && Scaffold.INSTANCE.L() > 0 && mc.thePlayer.onGround) { + boolean bl = RotationHandler.INSTANCE.getAngles3() == null || scaffoldTelly1.straightTicks.getInt() == 0; + switch ((JumpAimMode)scaffoldTelly1.jumpAim.getValue()) { + case REVERSE: + while (false) { + } + + movementInputEvent.L(true); + return; + case RESET: + if (bl && scaffoldTelly1.I >= scaffoldTelly1.d) { + movementInputEvent.L(true); + } + } + } + } + } +}