Fixed Block/Item.setRegistryName printing a incorrect warning when used. Closes #2398
This commit is contained in:
parent
a9ea634141
commit
a607a48719
2 changed files with 2 additions and 2 deletions
|
@ -1277,7 +1277,7 @@
|
||||||
+ String prefix = mc == null ? "minecraft" : mc.getModId();
|
+ String prefix = mc == null ? "minecraft" : mc.getModId();
|
||||||
+ if (!oldPrefix.equals(prefix) && oldPrefix.length() > 0)
|
+ 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;
|
+ prefix = oldPrefix;
|
||||||
+ }
|
+ }
|
||||||
+ this.registryName = new ResourceLocation(prefix, name);
|
+ this.registryName = new ResourceLocation(prefix, name);
|
||||||
|
|
|
@ -684,7 +684,7 @@
|
||||||
+ String prefix = mc == null ? "minecraft" : mc.getModId();
|
+ String prefix = mc == null ? "minecraft" : mc.getModId();
|
||||||
+ if (!oldPrefix.equals(prefix) && oldPrefix.length() > 0)
|
+ 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;
|
+ prefix = oldPrefix;
|
||||||
+ }
|
+ }
|
||||||
+ this.registryName = new ResourceLocation(prefix, name);
|
+ this.registryName = new ResourceLocation(prefix, name);
|
||||||
|
|
Loading…
Reference in a new issue