silenced obtrusive log message with custom biomes. Fixes #810

This commit is contained in:
gnembon committed 2021-04-17 00:47:12 -03:00
1 parent 4e5184009d
commit 3e24c24648
2 files changed
+22

No files matched your search

@@ -0,0 +1,21 @@
package carpet.mixins;
import carpet.CarpetSettings;
import net.minecraft.world.biome.source.BiomeArray;
import org.apache.logging.log4j.Logger;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(BiomeArray.class)
public class BiomeArray_cleanLogsMixin
{
@Redirect(method = "<init>(Lnet/minecraft/util/collection/IndexedIterable;[I)V", at = @At(
value = "INVOKE",
target = "Lorg/apache/logging/log4j/Logger;warn(Ljava/lang/String;)V")
)
private void skipLog(Logger logger, String message)
{
if (!CarpetSettings.cleanLogs) logger.warn(message);
}
}
+1
View File
@@ -215,6 +215,7 @@
"DebugRenderer_scarpetRenderMixin",
"WorldRenderer_scarpetRenderMixin",
"BiomeArray_cleanLogsMixin",
"SoundEngineInt_cleanLogsMixin",
"SoundSystem_cleanLogsMixin"
],