Skip to content

Commit

Permalink
Update to 1.19
Browse files Browse the repository at this point in the history
  • Loading branch information
Motschen committed Jun 11, 2022
1 parent b95045e commit 417cd3e
Show file tree
Hide file tree
Showing 17 changed files with 72 additions and 85 deletions.
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version=1.18.2
yarn_mappings=1.18.2+build.3
minecraft_version=1.19
yarn_mappings=1.19+build.1
loader_version=0.14.6

# Mod Properties
mod_version = 1.3.0
mod_version = 1.3.1
maven_group = net.puzzlemc
archives_base_name = puzzle

# Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
fabric_version=0.55.1+1.18.2
fabric_version=0.55.1+1.19
mod_menu_version = 2.0.13

cull_leaves_version = 2.3.2
cull_leaves_version = 2.3.3
ldl_version = 2.1.0+1.17
lbg_version = 1.2.3+1.18
iris_version = 1.18.x-v1.2.4
Expand All @@ -27,5 +27,5 @@ org.gradle.jvmargs=-Xmx1G
cem_version = 0.7.1
complete_config_version = 1.0.0
spruceui_version=3.3.3+1.18
midnightlib_version=0.4.0
midnightlib_version=0.5.1
entitytexturefeatures_version=3.0.0
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

@Mixin(DebugHud.class)
public abstract class MixinDebugHud extends DrawableHelper {
@Inject(at = @At("RETURN"), method = "getRightText", cancellable = true)
@Inject(at = @At("RETURN"), method = "getRightText")
private void puzzle$getRightText(CallbackInfoReturnable<List<String>> cir) {
if (PuzzleConfig.showPuzzleInfo) {
List<String> entries = cir.getReturnValue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import net.minecraft.client.gui.screen.*;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.text.Text;
import net.minecraft.text.TranslatableText;
import net.minecraft.util.Util;
import net.minecraft.util.math.MathHelper;
import org.spongepowered.asm.mixin.Final;
Expand Down Expand Up @@ -40,7 +39,7 @@ protected MixinTitleScreen(Text title) {
puzzleText = Text.of(PuzzleCore.version);
}
else {
puzzleText = new TranslatableText("").append(Text.of(PuzzleCore.version + " | ")).append(new TranslatableText("puzzle.text.update_available"));
puzzleText = Text.translatable("").append(Text.of(PuzzleCore.version + " | ")).append(Text.translatable("puzzle.text.update_available"));
this.puzzleTextWidth = this.textRenderer.getWidth(puzzleText);
}
}
Expand Down Expand Up @@ -68,7 +67,7 @@ private void confirmLink(boolean open) {
@Inject(at = @At("HEAD"), method = "mouseClicked",cancellable = true)
private void puzzle$mouseClicked(double mouseX, double mouseY, int button, CallbackInfoReturnable<Boolean> cir) {
if (mouseX > 2 && mouseX < (double)(2 + this.puzzleTextWidth) && mouseY > (double)(this.height - yOffset) && mouseY < (double)this.height - yOffset + 10) {
if (Objects.requireNonNull(this.client).options.chatLinksPrompt) {
if (Objects.requireNonNull(this.client).options.getChatLinksPrompt().getValue()) {
this.client.setScreen(new ConfirmChatLinkScreen(this::confirmLink, PuzzleCore.updateURL, true));
} else {
Util.getOperatingSystem().open(PuzzleCore.updateURL);
Expand Down
3 changes: 1 addition & 2 deletions puzzle-gui/src/main/java/net/puzzlemc/gui/IrisCompat.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.text.Text;
import net.minecraft.text.TranslatableText;
import net.puzzlemc.gui.screen.widget.PuzzleWidget;

public class IrisCompat {
Expand All @@ -17,7 +16,7 @@ public static void init() {
IrisApiConfig irisConfig = IrisApi.getInstance().getConfig();
irisConfig.setShadersEnabledAndApply(!irisConfig.areShadersEnabled());
}));
PuzzleApi.addToGraphicsOptions(new PuzzleWidget(new TranslatableText("options.iris.shaderPackSelection.title"), (button) -> button.setMessage(Text.of("OPEN")), (button) -> {
PuzzleApi.addToGraphicsOptions(new PuzzleWidget(Text.translatable("options.iris.shaderPackSelection.title"), (button) -> button.setMessage(Text.of("OPEN")), (button) -> {
MinecraftClient client = MinecraftClient.getInstance();
client.setScreen((Screen) IrisApi.getInstance().openMainIrisScreenObj(client.currentScreen));
}));
Expand Down
12 changes: 4 additions & 8 deletions puzzle-gui/src/main/java/net/puzzlemc/gui/PuzzleApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,18 @@ public class PuzzleApi {

public static void addToGraphicsOptions(PuzzleWidget button) {
GRAPHICS_OPTIONS.add(button);
if (PuzzleConfig.debugMessages) LOGGER.info(button.descriptionText.asString() + " -> Graphics Options");
if (PuzzleConfig.debugMessages) LOGGER.info(button.descriptionText.getContent().toString() + " -> Graphics Options");
}
public static void addToMiscOptions(PuzzleWidget button) {
MISC_OPTIONS.add(button);
if (PuzzleConfig.debugMessages) LOGGER.info(button.descriptionText.asString() + " -> Misc Options");
if (PuzzleConfig.debugMessages) LOGGER.info(button.descriptionText.getContent().toString() + " -> Misc Options");
}
public static void addToPerformanceOptions(PuzzleWidget button) {
PERFORMANCE_OPTIONS.add(button);
if (PuzzleConfig.debugMessages) LOGGER.info(button.descriptionText.asString() + "- > Performance Options");
if (PuzzleConfig.debugMessages) LOGGER.info(button.descriptionText.getContent().toString() + "- > Performance Options");
}
public static void addToResourceOptions(PuzzleWidget button) {
RESOURCE_OPTIONS.add(button);
if (PuzzleConfig.debugMessages) LOGGER.info(button.descriptionText.asString() + " -> Resource Options");
}
@Deprecated public static void addToTextureOptions(PuzzleWidget button) {
RESOURCE_OPTIONS.add(button);
if (PuzzleConfig.debugMessages) LOGGER.info(button.descriptionText.asString() + " -> LEGACY Texture Options");
if (PuzzleConfig.debugMessages) LOGGER.info(button.descriptionText.getContent().toString() + " -> Resource Options");
}
}
Loading

0 comments on commit 417cd3e

Please sign in to comment.