Skip to content

Commit

Permalink
CycleGUIButton only cycles on left click now
Browse files Browse the repository at this point in the history
  • Loading branch information
Placeblock committed Sep 10, 2023
1 parent 0266718 commit 82563bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
}

group = "de.codelix"
version = "1.3.6b"
version = "1.3.6c-SNAPSHOT"

var isReleaseVersion = !version.toString().endsWith("SNAPSHOT")
var artifactID = "BetterInventories"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@ private static ItemStack getItem(CycleEnum cycleEnum) {
.build();
}

@Override
public void onClick(ClickData data) {
/**
* Cycles the Values
* @param data The clickData if the click event
*/
public void cycle(ClickData data) {
int currentIndex = this.values.indexOf(this.currentValue);
int newIndex = (++currentIndex)%this.values.size();
this.currentValue = this.values.get(newIndex);
Expand Down

0 comments on commit 82563bf

Please sign in to comment.