Skip to content

Commit

Permalink
fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
plusls committed Mar 27, 2022
1 parent ae28ae3 commit de5c538
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ minecraft_version=1.18.2
yarn_mappings=2
loader_version=0.13.3
# Mod Properties
mod_version=2.0.9
mod_version=2.0.9.1
pre_release=alpha
maven_group=com.plusls
archives_base_name=MasaGadget
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ public void postInitGui(CallbackInfo ci) {
@Override
public void resize(MinecraftClient mc, int width, int height) {
super.resize(mc, width, height);
if (masaModGuiList == null) {
return;
}
masaModGuiList.setX(GuiUtils.getScaledWindowWidth() - 155);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ public void postInitGui(CallbackInfo ci) {
@Dynamic
@Inject(method = "resize", at = @At(value = "RETURN"))
public void favoritesResize(MinecraftClient mc, int width, int height, CallbackInfo callbackInfo) {
if (favoritesButton == null) {
return;
}
favoritesButton.setX(GuiUtils.getScaledWindowWidth() - 175);
}
}

0 comments on commit de5c538

Please sign in to comment.