diff options
author | Keuin <[email protected]> | 2021-01-24 13:39:16 +0800 |
---|---|---|
committer | keuin <[email protected]> | 2021-01-24 13:56:35 +0800 |
commit | a4edd87d61c2bc66494013ebef54518b8133b0d9 (patch) | |
tree | 79643e1ef5068e2243695cb284263345488e850d /src/main/java/com/keuin/ohmyvanillamc/mixin/DisableEntityTrackerEntrySpamming.java | |
parent | 8b8a8ccbb1a0885911136e89e5c28df8a59563f6 (diff) |
Add furnace lag fix. Use SemVer. BugFix: Entity Tracker spamming fix does not work in the previous versions.
Diffstat (limited to 'src/main/java/com/keuin/ohmyvanillamc/mixin/DisableEntityTrackerEntrySpamming.java')
-rw-r--r-- | src/main/java/com/keuin/ohmyvanillamc/mixin/DisableEntityTrackerEntrySpamming.java | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/main/java/com/keuin/ohmyvanillamc/mixin/DisableEntityTrackerEntrySpamming.java b/src/main/java/com/keuin/ohmyvanillamc/mixin/DisableEntityTrackerEntrySpamming.java index bf1f0b1..faf5c9d 100644 --- a/src/main/java/com/keuin/ohmyvanillamc/mixin/DisableEntityTrackerEntrySpamming.java +++ b/src/main/java/com/keuin/ohmyvanillamc/mixin/DisableEntityTrackerEntrySpamming.java @@ -1,7 +1,6 @@ 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; @@ -12,15 +11,24 @@ import org.spongepowered.asm.mixin.gen.Accessor; @Mixin(EntityTrackerEntry.class) public class DisableEntityTrackerEntrySpamming { - private static final Logger DUMMY_LOGGER = new DummyLogger(); + private static final Logger LOGGER_DUMMY = new DummyLogger(); + + static { + setLOGGER(LOGGER_DUMMY); + } @Shadow @Final private static Logger LOGGER; @Accessor("LOGGER") - private static Logger LOGGER() { - return OhMyVanillaMinecraft.getConfiguration().isFixEntityTrackerEntrySpamming() ? DUMMY_LOGGER : LOGGER; + private static Logger getLOGGER() { + throw new AssertionError(); + } + + @Accessor("LOGGER") + private static void setLOGGER(Logger logger) { + throw new AssertionError(); } } |