Fixed Block/Item.setRegistryName printing a incorrect warning when used. Closes #2398

This commit is contained in:
LexManos 2016-02-11 16:25:25 -08:00
parent a9ea634141
commit a607a48719
2 changed files with 2 additions and 2 deletions

View file

@ -1277,7 +1277,7 @@
+ String prefix = mc == null ? "minecraft" : mc.getModId();
+ if (!oldPrefix.equals(prefix) && oldPrefix.length() > 0)
+ {
+ net.minecraftforge.fml.common.FMLLog.bigWarning("Dangerous alternative prefix %s for name %s, invalid registry invocation/invalid name?", name.substring(0, index), name);
+ net.minecraftforge.fml.common.FMLLog.bigWarning("Dangerous alternative prefix %s for name %s, invalid registry invocation/invalid name?", oldPrefix, name);
+ prefix = oldPrefix;
+ }
+ this.registryName = new ResourceLocation(prefix, name);

View file

@ -684,7 +684,7 @@
+ String prefix = mc == null ? "minecraft" : mc.getModId();
+ if (!oldPrefix.equals(prefix) && oldPrefix.length() > 0)
+ {
+ net.minecraftforge.fml.common.FMLLog.bigWarning("Dangerous alternative prefix %s for name %s, invalid registry invocation/invalid name?", name.substring(0, index), name);
+ net.minecraftforge.fml.common.FMLLog.bigWarning("Dangerous alternative prefix %s for name %s, invalid registry invocation/invalid name?", oldPrefix, name);
+ prefix = oldPrefix;
+ }
+ this.registryName = new ResourceLocation(prefix, name);