|
4 | 4 | import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; |
5 | 5 | import com.mojang.serialization.DataResult; |
6 | 6 | import io.github.misode.packtest.LoadDiagnostics; |
7 | | -import io.github.misode.packtest.PackTest; |
8 | 7 | import net.minecraft.resources.ResourceLocation; |
9 | 8 | import net.minecraft.tags.TagFile; |
10 | 9 | import net.minecraft.tags.TagLoader; |
@@ -35,13 +34,11 @@ private static Object removeDuplicateError(DataResult<Object> dataResult, boolea |
35 | 34 | private static void catchTagError(Logger logger, String message, Object[] args, Operation<Void> original) { |
36 | 35 | String error = ((Exception)args[3]).getMessage().replaceFirst("^[A-Za-z0-9.]+Exception: ", ""); |
37 | 36 | String type = ((ResourceLocation)args[1]).getPath().replaceFirst("tags/", "").replaceFirst("s?/.*", ""); |
38 | | - LoadDiagnostics.error(type + " tag", ((ResourceLocation)args[0]).toString(), error); |
39 | | - LOGGER.error(PackTest.wrapError("Couldn't read {} tag {} - {}"), type, args[0], error); |
| 37 | + LoadDiagnostics.error(LOGGER, type + " tag", ((ResourceLocation)args[0]).toString(), error); |
40 | 38 | } |
41 | 39 |
|
42 | 40 | @WrapOperation(method = "method_33175", at = @At(value = "INVOKE", target = "Lorg/slf4j/Logger;error(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V", remap = false)) |
43 | 41 | private static void catchTagReferenceError(Logger logger, String message, Object id, Object refs, Operation<Void> original) { |
44 | | - LoadDiagnostics.error("tag", ((ResourceLocation)id).toString(), "Missing references: " + refs); |
45 | | - original.call(logger, PackTest.wrapError(message), id, refs); |
| 42 | + LoadDiagnostics.error(LOGGER, "tag", ((ResourceLocation)id).toString(), "Missing references: " + refs); |
46 | 43 | } |
47 | 44 | } |
0 commit comments