Delete more old code

This commit is contained in:
embeddedt 2025-12-26 16:10:07 -05:00
parent 7f27141a16
commit 555213714f
No known key found for this signature in database
GPG Key ID: A69433EC199B5613
4 changed files with 0 additions and 58 deletions

View File

@ -1,26 +0,0 @@
package org.embeddedt.modernfix.forge.classloading;
/**
* Sometimes mods have classes that circularly reference each other. If each of these classes ends up being loaded
* from two mods, a deadlock occurs.
*
* To avoid this problem we maintain a list of classes that should be loaded early and do it via Class.forName.
*/
public class ClassLoadHack {
private static final String[] classesToLoadEarly = new String[] {
"team.creative.creativecore.common.config.ConfigTypeConveration",
"team.creative.creativecore.common.util.ingredient.CreativeIngredient"
};
public static void loadModClasses() {
for(String clzName : classesToLoadEarly) {
try {
Class.forName(clzName);
} catch(Throwable e) {
if(!(e instanceof ClassNotFoundException)) {
e.printStackTrace();
}
}
}
}
}

View File

@ -1,6 +1,5 @@
package org.embeddedt.modernfix.forge.mixin.perf.fast_registry_validation;
import net.minecraftforge.fml.util.ObfuscationReflectionHelper;
import net.minecraftforge.registries.ForgeRegistry;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.Marker;
@ -10,27 +9,10 @@ import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import java.lang.reflect.Method;
import java.util.*;
@Mixin(value = ForgeRegistry.class, remap = false)
public class ForgeRegistryMixin<V> {
private static Method bitSetTrimMethod = null;
private static boolean bitSetTrimMethodRetrieved = false;
/**
* Cache the result of findMethod instead of running it multiple times.
* Null checks are not required as the surrounding code handles it already.
*/
@Redirect(method = "validateContent", at = @At(value = "INVOKE", target = "Lnet/minecraftforge/fml/util/ObfuscationReflectionHelper;findMethod(Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;"), require = 0)
private Method skipMultipleRemap(Class<?> clz, String methodName, Class<?>[] params) {
if(!bitSetTrimMethodRetrieved) {
bitSetTrimMethodRetrieved = true;
bitSetTrimMethod = ObfuscationReflectionHelper.findMethod(clz, methodName, params);
}
return bitSetTrimMethod;
}
private int expectedNextBit = -1;
/**

View File

@ -1,7 +0,0 @@
package org.embeddedt.modernfix.forge.rs;
import net.minecraftforge.fluids.capability.IFluidHandler;
public interface IFluidExternalStorageCache {
boolean initCache(IFluidHandler handler);
}

View File

@ -1,7 +0,0 @@
package org.embeddedt.modernfix.forge.rs;
import net.minecraftforge.items.IItemHandler;
public interface IItemExternalStorageCache {
boolean initCache(IItemHandler handler);
}