forked from mirrors/NBTExplorer
TileEntity crash bugs fixed.
This commit is contained in:
parent
fa804da8a6
commit
fa1052ab16
2 changed files with 7 additions and 2 deletions
|
@ -184,7 +184,9 @@ namespace Substrate
|
|||
public AlphaBlock Copy ()
|
||||
{
|
||||
AlphaBlock block = new AlphaBlock(_id, _data);
|
||||
block._tileEntity = _tileEntity.Copy();
|
||||
if (_tileEntity != null) {
|
||||
block._tileEntity = _tileEntity.Copy();
|
||||
}
|
||||
|
||||
return block;
|
||||
}
|
||||
|
|
|
@ -204,7 +204,10 @@ namespace Substrate
|
|||
SetID(x, y, z, block.ID);
|
||||
SetData(x, y, z, block.Data);
|
||||
|
||||
SetTileEntity(x, y, z, block.GetTileEntity().Copy());
|
||||
TileEntity te = block.GetTileEntity();
|
||||
if (te != null) {
|
||||
SetTileEntity(x, y, z, te.Copy());
|
||||
}
|
||||
}
|
||||
|
||||
#region IBoundedBlockCollection Members
|
||||
|
|
Loading…
Reference in a new issue