diff options
author | Keuin <[email protected]> | 2021-01-15 00:59:00 +0800 |
---|---|---|
committer | keuin <[email protected]> | 2021-01-15 00:59:00 +0800 |
commit | fd033b1204c30771a571897a3219866bb31394d3 (patch) | |
tree | d3f8c1c5ed05a3635bdc1d96fb0933aac07de60f /src/main/java/com/keuin/ohmyvanillamc/mixin | |
parent | 75f26f4ed9011e9dd12f5b49b26b94f8f4dacac1 (diff) |
Version 1.4.1: add switch for fixing EntityTrackerEntry spamming. Improve option list.
Diffstat (limited to 'src/main/java/com/keuin/ohmyvanillamc/mixin')
-rw-r--r-- | src/main/java/com/keuin/ohmyvanillamc/mixin/DisableEntityTrackerEntrySpamming.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/com/keuin/ohmyvanillamc/mixin/DisableEntityTrackerEntrySpamming.java b/src/main/java/com/keuin/ohmyvanillamc/mixin/DisableEntityTrackerEntrySpamming.java index 523aeed..bf1f0b1 100644 --- a/src/main/java/com/keuin/ohmyvanillamc/mixin/DisableEntityTrackerEntrySpamming.java +++ b/src/main/java/com/keuin/ohmyvanillamc/mixin/DisableEntityTrackerEntrySpamming.java @@ -1,9 +1,12 @@ package com.keuin.ohmyvanillamc.mixin; import com.keuin.ohmyvanillamc.DummyLogger; +import com.keuin.ohmyvanillamc.OhMyVanillaMinecraft; import net.minecraft.server.network.EntityTrackerEntry; import org.apache.logging.log4j.Logger; +import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.gen.Accessor; @Mixin(EntityTrackerEntry.class) @@ -11,9 +14,13 @@ public class DisableEntityTrackerEntrySpamming { private static final Logger DUMMY_LOGGER = new DummyLogger(); + @Shadow + @Final + private static Logger LOGGER; + @Accessor("LOGGER") private static Logger LOGGER() { - return DUMMY_LOGGER; + return OhMyVanillaMinecraft.getConfiguration().isFixEntityTrackerEntrySpamming() ? DUMMY_LOGGER : LOGGER; } } |