Make datapack reload exception silencers not required
This commit is contained in:
parent
6f07cbdc70
commit
ace3975156
|
|
@ -9,7 +9,7 @@ import org.spongepowered.asm.mixin.injection.Redirect;
|
|||
@Mixin(LootTables.class)
|
||||
public class LootTableManagerMixin {
|
||||
@Redirect(method = "*(Lnet/minecraft/resources/IResourceManager;Lcom/google/common/collect/ImmutableMap$Builder;Lnet/minecraft/util/ResourceLocation;Lcom/google/gson/JsonElement;)V",
|
||||
at = @At(value = "INVOKE", target = "Lorg/apache/logging/log4j/Logger;error(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V", remap = false))
|
||||
at = @At(value = "INVOKE", target = "Lorg/apache/logging/log4j/Logger;error(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V", remap = false), require = 0)
|
||||
private void logWithoutStacktrace(Logger instance, String s, Object location, Object exc) {
|
||||
instance.error(s + ": {}", location, exc.toString());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import org.spongepowered.asm.mixin.injection.Redirect;
|
|||
|
||||
@Mixin(RecipeManager.class)
|
||||
public class RecipeManagerMixin {
|
||||
@Redirect(method = "apply(Ljava/util/Map;Lnet/minecraft/server/packs/resources/ResourceManager;Lnet/minecraft/util/profiling/ProfilerFiller;)V", at = @At(value = "INVOKE", target = "Lorg/apache/logging/log4j/Logger;error(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V", remap = false))
|
||||
@Redirect(method = "apply(Ljava/util/Map;Lnet/minecraft/server/packs/resources/ResourceManager;Lnet/minecraft/util/profiling/ProfilerFiller;)V", at = @At(value = "INVOKE", target = "Lorg/apache/logging/log4j/Logger;error(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V", remap = false), require = 0)
|
||||
private void silenceException(Logger instance, String s, Object location, Object exc) {
|
||||
instance.error(s + ": {}", location, exc.toString());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user