Skip to content

Commit

Permalink
Merge branch '1.15' into 1.14
Browse files Browse the repository at this point in the history
  • Loading branch information
emonadeo committed Sep 5, 2020
2 parents 6fe022c + 3dc7dee commit 1985081
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
5 changes: 3 additions & 2 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
* Added omnidirectional auto-run w/ configurable buffer
* Added Cloth Config & Mod Menu integration
* Added support for Rideables (Boats, Horses, etc)
* Updated deprecated code
* Added missing lang entry for config menu
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ org.gradle.jvmargs=-Xmx1G

# Mod Properties
supported_versions = 1.14.X
mod_version = 0.2.0
mod_version = 0.2.1
maven_group = com.emonadeo
archives_base_name = autorun

Expand Down
12 changes: 8 additions & 4 deletions src/main/java/com/emonadeo/autorun/mixin/AutoRunMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,25 @@ public class AutoRunMixin {

@Redirect(method = "tick", at = @At(value = "FIELD", target = "net/minecraft/client/input/KeyboardInput.pressingForward:Z", opcode = Opcodes.GETFIELD))
private boolean onPressingForward(KeyboardInput input) {
return input.pressingForward || AutoRun.getToggled().contains(MovementDirection.FORWARD);
input.pressingForward = input.pressingForward || AutoRun.getToggled().contains(MovementDirection.FORWARD);
return input.pressingForward;
}

@Redirect(method = "tick", at = @At(value = "FIELD", target = "net/minecraft/client/input/KeyboardInput.pressingBack:Z", opcode = Opcodes.GETFIELD))
private boolean onPressingBack(KeyboardInput input) {
return input.pressingBack || AutoRun.getToggled().contains(MovementDirection.BACK);
input.pressingBack = input.pressingBack || AutoRun.getToggled().contains(MovementDirection.BACK);
return input.pressingBack;
}

@Redirect(method = "tick", at = @At(value = "FIELD", target = "net/minecraft/client/input/KeyboardInput.pressingLeft:Z", opcode = Opcodes.GETFIELD))
private boolean onPressingLeft(KeyboardInput input) {
return input.pressingLeft || AutoRun.getToggled().contains(MovementDirection.LEFT);
input.pressingLeft = input.pressingLeft || AutoRun.getToggled().contains(MovementDirection.LEFT);
return input.pressingLeft;
}

@Redirect(method = "tick", at = @At(value = "FIELD", target = "net/minecraft/client/input/KeyboardInput.pressingRight:Z", opcode = Opcodes.GETFIELD))
private boolean onPressingRight(KeyboardInput input) {
return input.pressingRight || AutoRun.getToggled().contains(MovementDirection.RIGHT);
input.pressingRight = input.pressingRight || AutoRun.getToggled().contains(MovementDirection.RIGHT);
return input.pressingRight;
}
}

0 comments on commit 1985081

Please sign in to comment.