Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ org.gradle.jvmargs=-Xmx2G
org.gradle.parallel=true
org.gradle.configuration-cache=false

mod_version = 20
loom_version=1.16-SNAPSHOT

minecraft_version=26.1
loader_version=0.19.2
fabric_api_version=0.146.1+26.1.2
modmenu_version=18.0.0-alpha.8
cloth_config_version=26.1.154
mod_version = 21
loom_version=1.17-SNAPSHOT

minecraft_version=26.2
loader_version=0.19.3
fabric_api_version=0.155.2+26.2
modmenu_version=20.0.1
cloth_config_version=26.2.155
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/win/baruna/blockmeter/BlockMeterClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ public void onInitializeClient() {
}

if (keyBindingMenu.consumeClick() && active) {
Minecraft.getInstance().setScreen(this.quickMenu);
Minecraft.getInstance().gui.setScreen(this.quickMenu);
}

if (keyBindingMeasure.consumeClick()) {
Expand Down Expand Up @@ -317,7 +317,7 @@ private Optional<BlockPos> raycastBlock() {
public void editBox(ClientMeasureBox box, BlockPos block) {
this.editBoxGui.setBox(box);
this.editBoxGui.setBlock(block);
Minecraft.getInstance().setScreen(this.editBoxGui);
Minecraft.getInstance().gui.setScreen(this.editBoxGui);
}

/**
Expand All @@ -338,7 +338,7 @@ private void onBlockMeterClick(final BlockPos block) {
default:
this.selectBoxGui.setBoxes(boxes);
this.selectBoxGui.setBlock(block);
Minecraft.getInstance().setScreen(this.selectBoxGui);
Minecraft.getInstance().gui.setScreen(this.selectBoxGui);
break;
}
} else {
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/win/baruna/blockmeter/gui/EditBoxGui.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@ protected void init() {
addButton.accept(new Button.Builder(Component.translatable("blockmeter.moveCorner"),
button -> {
box.loosenCorner(block);
Minecraft.getInstance().setScreen(null);
Minecraft.getInstance().gui.setScreen(null);
}));

addButton.accept(new Button.Builder(Component.translatable("blockmeter.restrictMining", Component.translatable(box.miningRestriction.translation)), button -> {
box.miningRestriction = box.miningRestriction.next();
Minecraft.getInstance().setScreen(null);
Minecraft.getInstance().gui.setScreen(null);
}));

addButton.accept(new Button.Builder(Component.translatable("gui.cancel"),
button -> Minecraft.getInstance().setScreen(null)));
button -> Minecraft.getInstance().gui.setScreen(null)));
}

@Override
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/win/baruna/blockmeter/gui/OptionsGui.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ protected void init() {
final ClientMeasureBox currentBox = BlockMeterClient.getInstance().getCurrentBox();
if (currentBox != null)
currentBox.setColor(DyeColor.byId(colorIndex));
Minecraft.getInstance().setScreen(null);
Minecraft.getInstance().gui.setScreen(null);
}));
}
}
Expand All @@ -53,7 +53,7 @@ protected void init() {
Component.translatable("blockmeter.keepColor", Component.translatable(config.incrementColor ? "options.off" :
"options.on")), button -> {
config.incrementColor = !config.incrementColor;
Minecraft.getInstance().setScreen(null);
Minecraft.getInstance().gui.setScreen(null);
// Todo find a way to increment to a new Color if a box was created while
// incrementColor was disabled
BlockMeterClient.getConfigManager().save();
Expand All @@ -66,7 +66,7 @@ protected void init() {
Component.translatable(config.innerDiagonal ? "options.on" : "options.off")), button -> {
System.err.println("IDK WHAT YOU ARE DOING");
config.innerDiagonal = !config.innerDiagonal;
Minecraft.getInstance().setScreen(null);
Minecraft.getInstance().gui.setScreen(null);
BlockMeterClient.getConfigManager().save();
})
.pos(this.width / 2 - BUTTONWIDTH / 2, this.height / 2 + 32)
Expand All @@ -77,7 +77,7 @@ protected void init() {
Component.translatable(config.showOtherUsersBoxes ? "options.on" : "options.off")), button -> {
System.err.println("IDK WHAT YOU ARE DOING");
config.showOtherUsersBoxes = !config.showOtherUsersBoxes;
Minecraft.getInstance().setScreen(null);
Minecraft.getInstance().gui.setScreen(null);
BlockMeterClient.getConfigManager().save();
})
.pos(this.width / 2 - BUTTONWIDTH / 2, this.height / 2 + 54)
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/win/baruna/blockmeter/gui/SelectBoxGui.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ protected void init() {
this.height / 2 - uiHeight / 2 + i * (BUTTONHEIGHT + PADDING), BUTTONWIDTH, BUTTONHEIGHT, text,
Color.ofOpaque(box.getColor()), false, true, button -> {
BlockMeterClient.getInstance().editBox(box, block);
Minecraft.getInstance().setScreen(null);
Minecraft.getInstance().gui.setScreen(null);
}));

}

this.addRenderableWidget(new Button.Builder(Component.translatable("gui.cancel"),
button -> Minecraft.getInstance().setScreen(null))
button -> Minecraft.getInstance().gui.setScreen(null))
.pos(this.width / 2 - BUTTONWIDTH / 2,
this.height / 2 - uiHeight / 2 + boxes.length * (BUTTONHEIGHT + PADDING) + PADDING)
.size(BUTTONWIDTH, BUTTONHEIGHT)
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"depends": {
"fabricloader": ">=0.19.2",
"fabric-api": "*",
"minecraft": ">=26.1 <=26.1.2"
"minecraft": ">=26.2"
},
"recommends": {
"modmenu": "*"
Expand Down