Skip to content

Commit

Permalink
Fix: overflow issue in command rune gui.
Browse files Browse the repository at this point in the history
Bump Version to 1.4.47

Took 26 minutes
  • Loading branch information
xkball committed Dec 25, 2024
1 parent 0d2defa commit 3ad13b3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ mod_name=Power Tool
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
mod_license=GPL-3.0
# The mod version. See https://semver.org/
mod_version=1.4.46
mod_version=1.4.47
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
# This should match the base package used for the mod sources.
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected void init() {
var mc = Minecraft.getInstance();
var font = mc.font;
var box_l = (int)Math.max(100,width*0.4);
var startY = (int)(height*0.15);
var startY = (int)(height*0.05);
delayedCommands.clear();
if(itemStack.has(PowerToolDataComponents.DELAYED_COMMANDS)) delayedCommands.addAll(Objects.requireNonNull(itemStack.get(PowerToolDataComponents.DELAYED_COMMANDS)));
this.name = new ObjectInputBox<>(font,width/2-box_l/2,startY,box_l,20,Component.literal("name"),ObjectInputBox.PASS_VALIDATOR,ObjectInputBox.PASS_RESPONDER);
Expand Down Expand Up @@ -83,7 +83,7 @@ protected void init() {
}

public void refreshContentPos(){
var startY = (int)(height*0.15);
var startY = (int)(height*0.05);
this.commandList.resize();
var listEndY = startY+50+commandList.getHeight_();
this.consume.setPosition(consume.getX(), listEndY+5);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void resize(){
}

public int getHeight_(){
return (int) Math.min(Math.max(100,24+45*id),screen.height*0.6);
return (int) Math.min(Math.max(100,24+45*id),screen.height*0.95-100);
}

@Override
Expand Down

0 comments on commit 3ad13b3

Please sign in to comment.