Skip to content

Commit

Permalink
Bump version to 1.2.5: fix potential crash
Browse files Browse the repository at this point in the history
  • Loading branch information
3TUSK committed Aug 8, 2022
1 parent 35d4db9 commit b18d7b3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ java {

teacon {
modId = 'powertool'
modVersion = '1.2.4'
modVersion = '1.2.5'
modLicense = 'GPL-3.0'
modGitHubRepo = 'teaconmc/PowerTool'
modAuthors = ['IzzelAliz']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,17 @@ public boolean keyPressed(int keyCode, int scanCode, int modifiers) {
if (keyCode == GLFW.GLFW_KEY_UP) {
// Move up one line
this.line = (this.line - 1) % this.messages.length;
if (this.line < 0) {
this.line = 0;
}
this.signField.setCursorToEnd();
return true;
} else if (keyCode == GLFW.GLFW_KEY_DOWN || keyCode == GLFW.GLFW_KEY_ENTER || keyCode == GLFW.GLFW_KEY_KP_ENTER) {
// Move down one line
this.line = (this.line + 1) % this.messages.length;
if (this.line >= this.messages.length) {
this.line = this.messages.length - 1;
}
this.signField.setCursorToEnd();
return true;
} else {
Expand Down

0 comments on commit b18d7b3

Please sign in to comment.