summaryrefslogtreecommitdiff
path: root/src/main/java/com/keuin/ohmyvanillamc/OhMyVanillaMinecraft.java
diff options
context:
space:
mode:
authorKeuin <[email protected]>2021-01-15 00:59:00 +0800
committerkeuin <[email protected]>2021-01-15 00:59:00 +0800
commitfd033b1204c30771a571897a3219866bb31394d3 (patch)
treed3f8c1c5ed05a3635bdc1d96fb0933aac07de60f /src/main/java/com/keuin/ohmyvanillamc/OhMyVanillaMinecraft.java
parent75f26f4ed9011e9dd12f5b49b26b94f8f4dacac1 (diff)
Version 1.4.1: add switch for fixing EntityTrackerEntry spamming. Improve option list.
Diffstat (limited to 'src/main/java/com/keuin/ohmyvanillamc/OhMyVanillaMinecraft.java')
-rw-r--r--src/main/java/com/keuin/ohmyvanillamc/OhMyVanillaMinecraft.java27
1 files changed, 1 insertions, 26 deletions
diff --git a/src/main/java/com/keuin/ohmyvanillamc/OhMyVanillaMinecraft.java b/src/main/java/com/keuin/ohmyvanillamc/OhMyVanillaMinecraft.java
index f76321a..fe9080e 100644
--- a/src/main/java/com/keuin/ohmyvanillamc/OhMyVanillaMinecraft.java
+++ b/src/main/java/com/keuin/ohmyvanillamc/OhMyVanillaMinecraft.java
@@ -4,10 +4,8 @@ import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonIOException;
import net.fabricmc.api.ModInitializer;
-import net.minecraft.server.network.EntityTrackerEntry;
import java.io.*;
-import java.lang.reflect.Field;
import java.nio.charset.StandardCharsets;
import java.util.logging.Logger;
@@ -16,35 +14,12 @@ public class OhMyVanillaMinecraft implements ModInitializer {
private static final Logger LOGGER = Logger.getLogger("OhMyVanillaMinecraft");
private static OmvmConfiguration configuration = null;
- private static final OmvmConfiguration defaultConfiguration = new OmvmConfiguration(
- false,
- false,
- false,
- false
- );
+ private static final OmvmConfiguration defaultConfiguration = new OmvmConfiguration();
public static OmvmConfiguration getConfiguration() {
return configuration != null ? configuration : defaultConfiguration;
}
- private static void disableEntityTrackerEntrySpamming() {
- try {
- //获取该类的字节码对象
- Class<EntityTrackerEntry> clazz = EntityTrackerEntry.class;
-
- //获取其私有成员
- Field name = clazz.getDeclaredField("LOGGER");
-
- //暴力反射
- name.setAccessible(true);
-
- //重新赋值 参数一:实力 参数二:值
-// name.set(EntityTrackerEntry, "小鸭鸭");
- } catch (NoSuchFieldException ignored) {
- // never mind
- }
- }
-
@Override
public void onInitialize() {
// This code runs as soon as Minecraft is in a mod-load-ready state.