Skip to content

Commit d759015

Browse files
authored
Update to 1.4.3 (1.20.4).
1 parent f590b59 commit d759015

5 files changed

Lines changed: 24 additions & 22 deletions

File tree

gradle.properties

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ org.gradle.jvmargs=-Xmx1G
33

44
# Fabric Properties
55
# check these on https://fabricmc.net/develop
6-
minecraft_version=1.20.2
7-
yarn_mappings=1.20.2+build.4
8-
loader_version=0.14.24
6+
minecraft_version=1.20.4
7+
yarn_mappings=1.20.4+build.1
8+
loader_version=0.15.0
99

1010
# Mod Properties
11-
mod_version = 1.4.2
11+
mod_version = 1.4.3
1212
maven_group = org.uiutils
1313
archives_base_name = uiutils
1414

1515
# Dependencies
16-
fabric_version=0.90.7+1.20.2
16+
fabric_version=0.91.1+1.20.4

src/main/java/org/uiutils/MainClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ public static void createWidgets(MinecraftClient mc, Screen screen) {
445445
if (mc.currentScreen == null) {
446446
throw new IllegalStateException("The current minecraft screen (mc.currentScreen) is null");
447447
}
448-
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection(Text.Serializer.toJson(mc.currentScreen.getTitle())), null);
448+
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection(Text.Serialization.toJsonString(mc.currentScreen.getTitle())), null);
449449
} catch (IllegalStateException e) {
450450
LOGGER.error("Error while copying title JSON to clipboard", e);
451451
}

src/main/java/org/uiutils/mixin/ClientCommonNetworkHandlerMixin.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ public abstract class ClientCommonNetworkHandlerMixin {
2525

2626
@Inject(at = @At("HEAD"), method = "onResourcePackSend", cancellable = true)
2727
public void onResourcePackSend(ResourcePackSendS2CPacket packet, CallbackInfo ci) {
28-
if (SharedVariables.bypassResourcePack && (packet.isRequired() || SharedVariables.resourcePackForceDeny)) {
29-
this.sendPacket(new ResourcePackStatusC2SPacket(ResourcePackStatusC2SPacket.Status.ACCEPTED));
30-
this.sendPacket(new ResourcePackStatusC2SPacket(ResourcePackStatusC2SPacket.Status.SUCCESSFULLY_LOADED));
28+
if (SharedVariables.bypassResourcePack && (packet.required() || SharedVariables.resourcePackForceDeny)) {
29+
this.sendPacket(new ResourcePackStatusC2SPacket(MinecraftClient.getInstance().getSession().getUuidOrNull(), ResourcePackStatusC2SPacket.Status.ACCEPTED));
30+
this.sendPacket(new ResourcePackStatusC2SPacket(MinecraftClient.getInstance().getSession().getUuidOrNull(), ResourcePackStatusC2SPacket.Status.SUCCESSFULLY_LOADED));
3131
MainClient.LOGGER.info(
3232
"[UI Utils]: Required Resource Pack Bypassed, Message: " +
33-
(packet.getPrompt() == null ? "<no message>" : packet.getPrompt().getString()) +
34-
", URL: " + (packet.getUrl() == null ? "<no url>" : packet.getUrl())
33+
(packet.prompt() == null ? "<no message>" : packet.prompt().getString()) +
34+
", URL: " + (packet.url() == null ? "<no url>" : packet.url())
3535
);
3636
ci.cancel();
3737
}

src/main/java/org/uiutils/mixin/MultiplayerScreenMixin.java

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,18 @@ private MultiplayerScreenMixin() {
1818

1919
@Inject(at = @At("TAIL"), method = "init")
2020
public void init(CallbackInfo ci) {
21-
// Create "Bypass Resource Pack" option
22-
this.addDrawableChild(ButtonWidget.builder(Text.of("Bypass Resource Pack: " + (SharedVariables.bypassResourcePack ? "ON" : "OFF")), (button) -> {
23-
SharedVariables.bypassResourcePack = !SharedVariables.bypassResourcePack;
24-
button.setMessage(Text.of("Bypass Resource Pack: " + (SharedVariables.bypassResourcePack ? "ON" : "OFF")));
25-
}).width(160).position(this.width - 170, this.height - 50).build());
21+
if (SharedVariables.enabled) {
22+
// Create "Bypass Resource Pack" option
23+
this.addDrawableChild(ButtonWidget.builder(Text.of("Bypass Resource Pack: " + (SharedVariables.bypassResourcePack ? "ON" : "OFF")), (button) -> {
24+
SharedVariables.bypassResourcePack = !SharedVariables.bypassResourcePack;
25+
button.setMessage(Text.of("Bypass Resource Pack: " + (SharedVariables.bypassResourcePack ? "ON" : "OFF")));
26+
}).width(160).position(this.width - 170, this.height - 50).build());
2627

27-
// Create "Force Deny" option
28-
this.addDrawableChild(ButtonWidget.builder(Text.of("Force Deny: " + (SharedVariables.resourcePackForceDeny ? "ON" : "OFF")), (button) -> {
29-
SharedVariables.resourcePackForceDeny = !SharedVariables.resourcePackForceDeny;
30-
button.setMessage(Text.of("Force Deny: " + (SharedVariables.resourcePackForceDeny ? "ON" : "OFF")));
31-
}).width(160).position(this.width - 170, this.height - 25).build());
28+
// Create "Force Deny" option
29+
this.addDrawableChild(ButtonWidget.builder(Text.of("Force Deny: " + (SharedVariables.resourcePackForceDeny ? "ON" : "OFF")), (button) -> {
30+
SharedVariables.resourcePackForceDeny = !SharedVariables.resourcePackForceDeny;
31+
button.setMessage(Text.of("Force Deny: " + (SharedVariables.resourcePackForceDeny ? "ON" : "OFF")));
32+
}).width(160).position(this.width - 170, this.height - 25).build());
33+
}
3234
}
3335
}

src/main/resources/fabric.mod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
],
2929

3030
"depends": {
31-
"fabricloader": ">=0.14.24",
31+
"fabricloader": ">=0.15.0",
3232
"fabric": "*",
3333
"minecraft": "~1.20",
3434
"java": ">=17"

0 commit comments

Comments
 (0)