diff --git a/fml/src/main/java/cpw/mods/fml/common/registry/FMLControlledNamespacedRegistry.java b/fml/src/main/java/cpw/mods/fml/common/registry/FMLControlledNamespacedRegistry.java index e94753f47..ef6a1031f 100644 --- a/fml/src/main/java/cpw/mods/fml/common/registry/FMLControlledNamespacedRegistry.java +++ b/fml/src/main/java/cpw/mods/fml/common/registry/FMLControlledNamespacedRegistry.java @@ -23,6 +23,7 @@ import cpw.mods.fml.common.FMLLog; import cpw.mods.fml.common.functions.GenericIterableFactory; public class FMLControlledNamespacedRegistry extends RegistryNamespaced { + public static final boolean DEBUG = Boolean.parseBoolean(System.getProperty("fml.debugRegistryEntries", "false")); private final Class superType; private String optionalDefaultName; private I optionalDefaultObject; @@ -396,14 +397,16 @@ public class FMLControlledNamespacedRegistry extends RegistryNamespaced { } addObjectRaw(idToUse, name, thing); - FMLLog.finer("Registry add: %s %d %s (req. id %d)", name, idToUse, thing, id); + if (DEBUG) + FMLLog.finer("Registry add: %s %d %s (req. id %d)", name, idToUse, thing, id); return idToUse; } void addAlias(String from, String to) { aliases.put(from, to); - FMLLog.finer("Registry alias: %s -> %s", from, to); + if (DEBUG) + FMLLog.finer("Registry alias: %s -> %s", from, to); } Map getEntriesNotIn(FMLControlledNamespacedRegistry registry) @@ -426,6 +429,9 @@ public class FMLControlledNamespacedRegistry extends RegistryNamespaced { void dump() { + if (!DEBUG) + return; + List ids = new ArrayList(); for (I thing : this.typeSafeIterable()) @@ -439,7 +445,7 @@ public class FMLControlledNamespacedRegistry extends RegistryNamespaced { for (int id : ids) { I thing = getRaw(id); - FMLLog.finer("Registry: %s %d %s", getNameForObject(thing), id, thing); + FMLLog.finer("Registry: %d %s %s", id, getNameForObject(thing), thing); } } diff --git a/fml/src/main/java/cpw/mods/fml/common/registry/GameData.java b/fml/src/main/java/cpw/mods/fml/common/registry/GameData.java index ec1f30801..aa7ec6c3d 100644 --- a/fml/src/main/java/cpw/mods/fml/common/registry/GameData.java +++ b/fml/src/main/java/cpw/mods/fml/common/registry/GameData.java @@ -834,7 +834,8 @@ public class GameData { } else // ItemBlock after its Block { - FMLLog.fine("Found matching Block %s for ItemBlock %s at id %d, original id requested: %d", block, item, id, idHint); + if (FMLControlledNamespacedRegistry.DEBUG) + FMLLog.fine("Found matching Block %s for ItemBlock %s at id %d, original id requested: %d", block, item, id, idHint); freeSlot(id, item); // temporarily free the slot occupied by the Block for the item registration }