Merge branch '1.7.10'
This commit is contained in:
commit
5045d8df68
5 changed files with 8 additions and 5 deletions
fml/src/main/java/net/minecraftforge/fml/common
src/main/java/net/minecraftforge
|
@ -5,7 +5,7 @@
|
||||||
* are made available under the terms of the GNU Lesser Public License v2.1
|
* are made available under the terms of the GNU Lesser Public License v2.1
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* cpw - implementation
|
* cpw - implementation
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -80,7 +80,7 @@ public class ModCandidate
|
||||||
public void addClassEntry(String name)
|
public void addClassEntry(String name)
|
||||||
{
|
{
|
||||||
String className = name.substring(0, name.lastIndexOf('.')); // strip the .class
|
String className = name.substring(0, name.lastIndexOf('.')); // strip the .class
|
||||||
foundClasses.add(className.replace('.', '/'));
|
foundClasses.add(className);
|
||||||
className = className.replace('/','.');
|
className = className.replace('/','.');
|
||||||
int pkgIdx = className.lastIndexOf('.');
|
int pkgIdx = className.lastIndexOf('.');
|
||||||
if (pkgIdx > -1)
|
if (pkgIdx > -1)
|
||||||
|
|
|
@ -65,7 +65,7 @@ class ObjectHolderRef {
|
||||||
|
|
||||||
if (this.injectedObject == null || !isValid())
|
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);
|
makeWritable(field);
|
||||||
}
|
}
|
||||||
|
@ -120,7 +120,7 @@ class ObjectHolderRef {
|
||||||
|
|
||||||
if (thing == null)
|
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;
|
return;
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
|
|
|
@ -12,6 +12,7 @@ import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraft.crash.CrashReport;
|
import net.minecraft.crash.CrashReport;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraftforge.common.ForgeHooks.SeedEntry;
|
import net.minecraftforge.common.ForgeHooks.SeedEntry;
|
||||||
|
import net.minecraftforge.fluids.FluidRegistry;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
|
||||||
public class MinecraftForge
|
public class MinecraftForge
|
||||||
|
@ -162,6 +163,8 @@ public class MinecraftForge
|
||||||
}
|
}
|
||||||
|
|
||||||
UsernameCache.load();
|
UsernameCache.load();
|
||||||
|
// Load before all the mods, so MC owns the MC fluids
|
||||||
|
FluidRegistry.validateFluidRegistry();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getBrandingVersion()
|
public static String getBrandingVersion()
|
||||||
|
|
|
@ -114,7 +114,7 @@ public abstract class FluidRegistry
|
||||||
Integer id = localFluidIDs.remove(oldFluid);
|
Integer id = localFluidIDs.remove(oldFluid);
|
||||||
localFluidIDs.put(fluid, id);
|
localFluidIDs.put(fluid, id);
|
||||||
}
|
}
|
||||||
BiMap<Integer, String> localFluidNames = fluidNames;
|
BiMap<Integer, String> localFluidNames = HashBiMap.create();
|
||||||
for (Entry<Fluid, Integer> e : localFluidIDs.entrySet()) {
|
for (Entry<Fluid, Integer> e : localFluidIDs.entrySet()) {
|
||||||
localFluidNames.put(e.getValue(), e.getKey().getName());
|
localFluidNames.put(e.getValue(), e.getKey().getName());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue