Skip to content
This repository was archived by the owner on Mar 5, 2023. It is now read-only.

Commit eeb07fe

Browse files
committed
[1.7.10] Made RayTraceBypass more configurable
1 parent 85bfdd9 commit eeb07fe

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

src/main/java/me/earth/earthhack/impl/modules/combat/autocrystal/AutoCrystal.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,12 @@ public class AutoCrystal extends Module
152152
protected final Setting<Integer> bypassTicks =
153153
register(new NumberSetting<>("BypassTicks", 10, 0, 20))
154154
.setComplexity(Complexity.Expert);
155+
protected final Setting<Float> rbYaw =
156+
register(new NumberSetting<>("RB-Yaw", 180.0f, 0.0f, 180.0f))
157+
.setComplexity(Complexity.Expert);
158+
protected final Setting<Float> rbPitch =
159+
register(new NumberSetting<>("RB-Pitch", 90.0f, 0.0f, 90.0f))
160+
.setComplexity(Complexity.Expert);
155161
protected final Setting<Integer> bypassRotationTime =
156162
register(new NumberSetting<>("RayBypassRotationTime", 500, 0, 1000))
157163
.setComplexity(Complexity.Expert);

src/main/java/me/earth/earthhack/impl/modules/combat/autocrystal/ListenerMotion.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,15 @@ public void invoke(MotionUpdateEvent event)
9696
if (bypassPos != null) {
9797
float[] rotations =
9898
RotationUtil.getRotationsToTopMiddleUp(bypassPos);
99-
event.setYaw((rotations[0] + 180) % 360);
100-
event.setPitch(-rotations[1]);
99+
float pitch =
100+
rotations[1] == 0.0f && module.rbYaw.getValue() != 0.0f
101+
? 0.0f
102+
: rotations[1] < 0.0f
103+
? rotations[1] + module.rbPitch.getValue()
104+
: rotations[1] - module.rbPitch.getValue();
105+
106+
event.setYaw((rotations[0] + module.rbYaw.getValue()) % 360);
107+
event.setPitch(pitch);
101108
}
102109
}
103110
} else {

0 commit comments

Comments
 (0)