From 66ee7385cca50a27517db1225d5a2a0b6ca88a28 Mon Sep 17 00:00:00 2001 From: Misode Date: Fri, 14 Jun 2024 22:31:21 +0200 Subject: [PATCH] Fix crash in LootDataTypeMixin --- gradle.properties | 2 +- .../java/io/github/misode/packtest/mixin/LootDataTypeMixin.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 7f4fd0f..0291df9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ minecraft_version=1.21 loader_version=0.15.11 # Mod Properties -mod_version=1.8.0-beta2 +mod_version=1.8.0-beta3 maven_group=io.github.misode archives_base_name=packtest diff --git a/src/main/java/io/github/misode/packtest/mixin/LootDataTypeMixin.java b/src/main/java/io/github/misode/packtest/mixin/LootDataTypeMixin.java index 0c827d6..8578521 100644 --- a/src/main/java/io/github/misode/packtest/mixin/LootDataTypeMixin.java +++ b/src/main/java/io/github/misode/packtest/mixin/LootDataTypeMixin.java @@ -23,7 +23,7 @@ public class LootDataTypeMixin { @WrapOperation(method = "method_53267", at = @At(value = "INVOKE", target = "Lorg/slf4j/Logger;error(Ljava/lang/String;[Ljava/lang/Object;)V", remap = false)) private void deserialize(Logger logger, String message, Object[] args, Operation original) { - String type = ((String)args[0]).replaceAll("_", " ").replaceFirst("s$", ""); + String type = ((ResourceLocation)args[0]).toString().replaceAll("_", " ").replaceFirst("s$", ""); LoadDiagnostics.error(LOGGER, type, ((ResourceLocation)args[1]).toString(), (String)args[2]); } }