diff --git a/fml/src/main/java/net/minecraftforge/fml/common/discovery/ITypeDiscoverer.java b/fml/src/main/java/net/minecraftforge/fml/common/discovery/ITypeDiscoverer.java index 885fd85a9f..15d2609b5c 100644 --- a/fml/src/main/java/net/minecraftforge/fml/common/discovery/ITypeDiscoverer.java +++ b/fml/src/main/java/net/minecraftforge/fml/common/discovery/ITypeDiscoverer.java @@ -5,7 +5,7 @@ * are made available under the terms of the GNU Lesser Public License v2.1 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - * + * * Contributors: * cpw - implementation */ diff --git a/fml/src/main/java/net/minecraftforge/fml/common/discovery/ModCandidate.java b/fml/src/main/java/net/minecraftforge/fml/common/discovery/ModCandidate.java index 2c8d366af6..7145c366dc 100644 --- a/fml/src/main/java/net/minecraftforge/fml/common/discovery/ModCandidate.java +++ b/fml/src/main/java/net/minecraftforge/fml/common/discovery/ModCandidate.java @@ -80,7 +80,7 @@ public class ModCandidate public void addClassEntry(String name) { String className = name.substring(0, name.lastIndexOf('.')); // strip the .class - foundClasses.add(className.replace('.', '/')); + foundClasses.add(className); className = className.replace('/','.'); int pkgIdx = className.lastIndexOf('.'); if (pkgIdx > -1) diff --git a/fml/src/main/java/net/minecraftforge/fml/common/registry/ObjectHolderRef.java b/fml/src/main/java/net/minecraftforge/fml/common/registry/ObjectHolderRef.java index 3a35717010..08a93821f6 100644 --- a/fml/src/main/java/net/minecraftforge/fml/common/registry/ObjectHolderRef.java +++ b/fml/src/main/java/net/minecraftforge/fml/common/registry/ObjectHolderRef.java @@ -65,7 +65,7 @@ class ObjectHolderRef { if (this.injectedObject == null || !isValid()) { - throw new IllegalStateException("The ObjectHolder annotation cannot apply to a field that is not an Item or Block"); + throw new IllegalStateException(String.format("The ObjectHolder annotation cannot apply to a field that is not an Item or Block (found : %s at %s.%s)", field.getType().getName(), field.getClass().getName(), field.getName())); } makeWritable(field); } @@ -120,7 +120,7 @@ class ObjectHolderRef { if (thing == null) { - FMLLog.warning("Unable to lookup %s for %s. Is there something wrong with the registry?", injectedObject, field); + FMLLog.getLogger().log(Level.DEBUG, "Unable to lookup {} for {}. This means the object wasn't registered. It's likely just mod options.", injectedObject, field); return; } try diff --git a/src/main/java/net/minecraftforge/common/MinecraftForge.java b/src/main/java/net/minecraftforge/common/MinecraftForge.java index fc15992cd2..508390569b 100644 --- a/src/main/java/net/minecraftforge/common/MinecraftForge.java +++ b/src/main/java/net/minecraftforge/common/MinecraftForge.java @@ -12,6 +12,7 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraft.crash.CrashReport; import net.minecraft.item.ItemStack; import net.minecraftforge.common.ForgeHooks.SeedEntry; +import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.oredict.OreDictionary; public class MinecraftForge @@ -162,6 +163,8 @@ public class MinecraftForge } UsernameCache.load(); + // Load before all the mods, so MC owns the MC fluids + FluidRegistry.validateFluidRegistry(); } public static String getBrandingVersion() diff --git a/src/main/java/net/minecraftforge/fluids/FluidRegistry.java b/src/main/java/net/minecraftforge/fluids/FluidRegistry.java index 6a096377be..f444e4e279 100644 --- a/src/main/java/net/minecraftforge/fluids/FluidRegistry.java +++ b/src/main/java/net/minecraftforge/fluids/FluidRegistry.java @@ -114,7 +114,7 @@ public abstract class FluidRegistry Integer id = localFluidIDs.remove(oldFluid); localFluidIDs.put(fluid, id); } - BiMap localFluidNames = fluidNames; + BiMap localFluidNames = HashBiMap.create(); for (Entry e : localFluidIDs.entrySet()) { localFluidNames.put(e.getValue(), e.getKey().getName()); }