#940: Fixed a NPE during CraftBlockEntityState#update.
When the BlockState's block type was changed, #update may have removed the TileEntity, causing #isApplicable to fail with a NPE.
This commit is contained in:
parent
960f31098d
commit
11c9299fbb
@ -82,7 +82,7 @@ public abstract class CraftBlockEntityState<T extends TileEntity> extends CraftB
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected boolean isApplicable(TileEntity tileEntity) {
|
protected boolean isApplicable(TileEntity tileEntity) {
|
||||||
return this.tileEntity.getClass() == tileEntity.getClass();
|
return tileEntity != null && this.tileEntity.getClass() == tileEntity.getClass();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user