mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-27 23:45:44 +00:00
Holy Moly, it's a big fat commit of broken code!
This commit is contained in:
1 parent
5b05e103f4
commit
c1f0e1b68f
63 files changed
+2027
-542
No files matched your search
@@ -30,6 +30,7 @@ import java.util.Map.Entry;
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraftforge.fml.ModThreadContext;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
|
||||
import java.util.Set;
|
||||
@@ -277,8 +278,7 @@ public class ForgeRegistry<V extends IForgeRegistryEntry<V>> implements IForgeRe
|
||||
|
||||
int add(int id, V value)
|
||||
{
|
||||
ModContainer mc = Loader.instance().activeModContainer();
|
||||
String owner = mc == null || (mc instanceof InjectedModContainer && ((InjectedModContainer)mc).wrappedContainer instanceof FMLContainer) ? null : mc.getModId().toLowerCase();
|
||||
final String owner = ModThreadContext.get().getCurrentContainer().getPrefix();
|
||||
return add(id, value, owner);
|
||||
}
|
||||
|
||||
@@ -430,7 +430,7 @@ public class ForgeRegistry<V extends IForgeRegistryEntry<V>> implements IForgeRe
|
||||
{
|
||||
try
|
||||
{
|
||||
ReflectionHelper.findMethod(BitSet.class, "trimToSize", null).invoke(this.availabilityMap);
|
||||
// ReflectionHelper.findMethod(BitSet.class, "trimToSize", null).invoke(this.availabilityMap);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
@@ -49,6 +49,7 @@ import net.minecraft.world.biome.Biome;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.RegistryEvent;
|
||||
import net.minecraftforge.event.RegistryEvent.MissingMappings;
|
||||
import net.minecraftforge.fml.Logging;
|
||||
import net.minecraftforge.fml.common.EnhancedRuntimeException;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import net.minecraftforge.fml.common.FMLContainer;
|
||||
@@ -83,6 +84,8 @@ import javax.annotation.Nullable;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import static net.minecraftforge.fml.Logging.fmlLog;
|
||||
|
||||
/**
|
||||
* INTERNAL ONLY
|
||||
* MODDERS SHOULD HAVE NO REASON TO USE THIS CLASS
|
||||
@@ -201,7 +204,7 @@ public class GameData
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
public static void vanillaSnapshot()
|
||||
{
|
||||
FMLLog.log.debug("Creating vanilla freeze snapshot");
|
||||
fmlLog.debug("Creating vanilla freeze snapshot");
|
||||
for (Map.Entry<ResourceLocation, ForgeRegistry<? extends IForgeRegistryEntry<?>>> r : RegistryManager.ACTIVE.registries.entrySet())
|
||||
{
|
||||
final Class<? extends IForgeRegistryEntry> clazz = RegistryManager.ACTIVE.getSuperType(r.getKey());
|
||||
@@ -214,7 +217,7 @@ public class GameData
|
||||
});
|
||||
RegistryManager.VANILLA.registries.forEach(LOCK_VANILLA);
|
||||
RegistryManager.ACTIVE.registries.forEach(LOCK_VANILLA);
|
||||
FMLLog.log.debug("Vanilla freeze snapshot created");
|
||||
fmlLog.debug("Vanilla freeze snapshot created");
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
|
||||
Reference in new issue
Block a user