TileEntity crash bugs fixed.

This commit is contained in:
Justin Aquadro 2011-08-14 18:22:23 +00:00
parent fa804da8a6
commit fa1052ab16
2 changed files with 7 additions and 2 deletions

View file

@ -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;
}

View file

@ -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