Fixed IModelData not being cleared when tile entity is removed (#6115)
This commit is contained in:
parent
01d14004a9
commit
5978670897
2 changed files with 8 additions and 3 deletions
|
@ -49,15 +49,16 @@
|
||||||
this.field_145850_b.func_175666_e(this.field_174879_c, this.field_195045_e.func_177230_c());
|
this.field_145850_b.func_175666_e(this.field_174879_c, this.field_195045_e.func_177230_c());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -139,6 +146,7 @@
|
@@ -139,6 +146,8 @@
|
||||||
|
|
||||||
public void func_145843_s() {
|
public void func_145843_s() {
|
||||||
this.field_145846_f = true;
|
this.field_145846_f = true;
|
||||||
+ this.invalidateCaps();
|
+ this.invalidateCaps();
|
||||||
|
+ requestModelDataUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void func_145829_t() {
|
public void func_145829_t() {
|
||||||
@@ -181,6 +189,13 @@
|
@@ -181,6 +190,13 @@
|
||||||
return this.field_200663_e;
|
return this.field_200663_e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -84,10 +84,14 @@ public class ModelDataManager
|
||||||
for (BlockPos pos : needUpdate)
|
for (BlockPos pos : needUpdate)
|
||||||
{
|
{
|
||||||
TileEntity toUpdate = world.getTileEntity(pos);
|
TileEntity toUpdate = world.getTileEntity(pos);
|
||||||
if (toUpdate != null)
|
if (toUpdate != null && !toUpdate.isRemoved())
|
||||||
{
|
{
|
||||||
data.put(pos, toUpdate.getModelData());
|
data.put(pos, toUpdate.getModelData());
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
data.remove(pos);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue