summaryrefslogtreecommitdiff
path: root/src/main/java/com/keuin/ohmyvanillamc/mixin/DisableEntityTrackerEntrySpamming.java
diff options
context:
space:
mode:
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();
}
}