mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Fix overrides typo in saving registry data. Closes #4894
This commit is contained in:
1 parent
34f4381e0c
commit
a99fe41667
1 file changed
+17
-2
@@ -156,7 +156,7 @@ public final class FMLContainer extends DummyModContainer implements WorldAccess
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
tag.setString("K", entry.getKey().toString());
|
||||
tag.setString("V", entry.getValue().toString());
|
||||
aliases.appendTag(tag);
|
||||
overrides.appendTag(tag);
|
||||
}
|
||||
data.setTag("overrides", overrides);
|
||||
|
||||
@@ -231,7 +231,22 @@ public final class FMLContainer extends DummyModContainer implements WorldAccess
|
||||
for (int x = 0; x < list.tagCount(); x++)
|
||||
{
|
||||
NBTTagCompound e = list.getCompoundTagAt(x);
|
||||
entry.aliases.put(new ResourceLocation(e.getString("K")), new ResourceLocation(e.getString("V")));
|
||||
String v = e.getString("V");
|
||||
if (v.indexOf(':') == -1) //Forge Bug: https://github.com/MinecraftForge/MinecraftForge/issues/4894 TODO: Remove in 1.13
|
||||
{
|
||||
entry.overrides.put(new ResourceLocation(e.getString("K")), v);
|
||||
}
|
||||
else
|
||||
{
|
||||
entry.aliases.put(new ResourceLocation(e.getString("K")), new ResourceLocation(v));
|
||||
}
|
||||
}
|
||||
|
||||
list = ent.getTagList("overrides", 10);
|
||||
for (int x = 0; x < list.tagCount(); x++)
|
||||
{
|
||||
NBTTagCompound e = list.getCompoundTagAt(x);
|
||||
entry.overrides.put(new ResourceLocation(e.getString("K")), e.getString("V"));
|
||||
}
|
||||
|
||||
int[] blocked = regs.getCompoundTag(key).getIntArray("blocked");
|
||||
|
||||
Reference in new issue
Block a user