Skip to content

Commit

Permalink
Movement Recorder fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
onixiya1337 committed Dec 22, 2023
1 parent d8c5531 commit 4b56ed2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ baseGroup=com.jelly.farmhelperv2
mcVersion=1.8.9
modid=farmhelperv2
modName=FarmHelper
version=2.2.9-pre2
version=2.2.9-pre3
shouldRelease=true
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public class MovRecPlayer implements IFeature {
private static MovRecPlayer instance;
private static boolean isMovementPlaying = false;
private static boolean isMovementReading = false;
private static boolean attackKeyPressed = false;
private static int currentDelay = 0;
private static int playingIndex = 0;
private static float yawDifference = 0;
Expand Down Expand Up @@ -180,7 +179,6 @@ public void resetStatesAfterMacroDisabled() {
currentDelay = 0;
isMovementPlaying = false;
isMovementReading = false;
attackKeyPressed = false;
recordingName = "";
resetTimers();
}
Expand Down Expand Up @@ -237,7 +235,6 @@ public void onTickPlayMovement(TickEvent.ClientTickEvent event) {
currentDelay++;
return;
}
attackKeyPressed = false;
playingIndex++;
currentDelay = 0;
if (playingIndex >= movements.size()) {
Expand All @@ -259,10 +256,9 @@ private void setPlayerMovement(Movement movement) {
if (mc.thePlayer.capabilities.allowFlying && mc.thePlayer.capabilities.isFlying != movement.fly)
mc.thePlayer.capabilities.isFlying = movement.fly;
KeyBinding.setKeyBindState(mc.gameSettings.keyBindJump.getKeyCode(), movement.jump);
if (movement.attack && !attackKeyPressed) {
if (movement.attack && currentDelay == 0)
KeyBindUtils.leftClick();
attackKeyPressed = true;
}
KeyBinding.setKeyBindState(mc.gameSettings.keyBindAttack.getKeyCode(), movement.attack);
}

public static class Movement {
Expand Down

0 comments on commit 4b56ed2

Please sign in to comment.