summaryrefslogtreecommitdiff
path: root/src/main/java/com/keuin/ohmyvanillamc/mixin/DisableEntityTrackerEntrySpamming.java
diff options
context:
space:
mode:
authorKeuin <[email protected]>2021-01-24 13:39:16 +0800
committerkeuin <[email protected]>2021-01-24 13:39:16 +0800
commita05313f031e2ca35759af58f82b3177e4bcfba8c (patch)
tree79643e1ef5068e2243695cb284263345488e850d /src/main/java/com/keuin/ohmyvanillamc/mixin/DisableEntityTrackerEntrySpamming.java
parent8b8a8ccbb1a0885911136e89e5c28df8a59563f6 (diff)
Add furnace lag fix. Use SemVer.
Diffstat (limited to 'src/main/java/com/keuin/ohmyvanillamc/mixin/DisableEntityTrackerEntrySpamming.java')
-rw-r--r--src/main/java/com/keuin/ohmyvanillamc/mixin/DisableEntityTrackerEntrySpamming.java16
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();
}
}