Fixed IModelData not being cleared when tile entity is removed (#6115)

This commit is contained in:
Wyn Price authored and tterrag committed 2019-10-10 23:07:52 -04:00
1 parent 01d14004a9
commit 5978670897
2 files changed
+8 -3

No files matched your search

@@ -84,10 +84,14 @@ public class ModelDataManager
for (BlockPos pos : needUpdate)
{
TileEntity toUpdate = world.getTileEntity(pos);
if (toUpdate != null)
if (toUpdate != null && !toUpdate.isRemoved())
{
data.put(pos, toUpdate.getModelData());
}
else
{
data.remove(pos);
}
}
}
}