diff --git a/src/main/java/net/minecraftforge/fml/common/registry/FMLControlledNamespacedRegistry.java b/src/main/java/net/minecraftforge/fml/common/registry/FMLControlledNamespacedRegistry.java index e35847845..9d620514c 100644 --- a/src/main/java/net/minecraftforge/fml/common/registry/FMLControlledNamespacedRegistry.java +++ b/src/main/java/net/minecraftforge/fml/common/registry/FMLControlledNamespacedRegistry.java @@ -28,7 +28,7 @@ import net.minecraftforge.fml.common.registry.RegistryDelegate.Delegate; public class FMLControlledNamespacedRegistry extends RegistryNamespacedDefaultedByKey { - public static final boolean DEBUG = Boolean.parseBoolean(System.getProperty("fml.debugRegistryEntries", "false")); + public static final boolean DEBUG = Boolean.parseBoolean(System.getProperty("fml.debugRegistryEntries", "true")); private final Class superType; private final boolean isDelegated; private final Field delegateAccessor; diff --git a/src/main/java/net/minecraftforge/fml/common/registry/GameData.java b/src/main/java/net/minecraftforge/fml/common/registry/GameData.java index f8e850b6d..8833d69d0 100644 --- a/src/main/java/net/minecraftforge/fml/common/registry/GameData.java +++ b/src/main/java/net/minecraftforge/fml/common/registry/GameData.java @@ -32,7 +32,7 @@ public class GameData static final int MAX_BLOCK_ID = 4095; static final int MIN_ITEM_ID = 4096; static final int MAX_ITEM_ID = 31999; - public static final int MIN_POTION_ID = 32; // 0-31 are vanilla, forge start at 32 + public static final int MIN_POTION_ID = 0; // 0-~31 are vanilla, forge start at 32 public static final int MAX_POTION_ID = 255; // S1DPacketEntityEffect sends bytes, we can only use 255 private static final GameData mainData = new GameData(); @@ -147,13 +147,6 @@ public class GameData return iBlockRegistry.add(idHint, name, block); } - /** - * Called from GameRegistry, which is called from Potion-Constructor - */ - int registerPotion(Potion potion, ResourceLocation name, int id) { - return iPotionRegistry.add(id, name, potion); - } - /** * Prefix the supplied name with the current mod id. *

diff --git a/src/main/java/net/minecraftforge/fml/common/registry/GameRegistry.java b/src/main/java/net/minecraftforge/fml/common/registry/GameRegistry.java index 954e2c6d3..04182af02 100644 --- a/src/main/java/net/minecraftforge/fml/common/registry/GameRegistry.java +++ b/src/main/java/net/minecraftforge/fml/common/registry/GameRegistry.java @@ -236,11 +236,6 @@ public class GameRegistry } } - /** Called from Potion Constructor */ - public static int registerPotion(Potion potion, ResourceLocation name, int potionID) { - return GameData.getMain().registerPotion(potion, name, potionID); - } - public static void addRecipe(ItemStack output, Object... params) { addShapedRecipe(output, params); diff --git a/src/main/java/net/minecraftforge/fml/common/registry/PersistentRegistryManager.java b/src/main/java/net/minecraftforge/fml/common/registry/PersistentRegistryManager.java index 9683db840..a8c4a157a 100644 --- a/src/main/java/net/minecraftforge/fml/common/registry/PersistentRegistryManager.java +++ b/src/main/java/net/minecraftforge/fml/common/registry/PersistentRegistryManager.java @@ -217,8 +217,8 @@ public class PersistentRegistryManager private static void loadFrozenDataToStagingRegistry(Map> remaps, ResourceLocation registryName, Class regType) { - FMLControlledNamespacedRegistry newRegistry = PersistentRegistry.STAGING.getRegistry(registryName, regType); FMLControlledNamespacedRegistry frozenRegistry = PersistentRegistry.FROZEN.getRegistry(registryName, regType); + FMLControlledNamespacedRegistry newRegistry = PersistentRegistry.STAGING.getOrShallowCopyRegistry(registryName, regType, frozenRegistry); newRegistry.loadIds(frozenRegistry.getEntriesNotIn(newRegistry), Maps.newLinkedHashMap(), remaps.get(registryName), frozenRegistry, registryName); }