/**
* Gets the TileEntity for a given block in this chunk
*/
@Override
public TileEntity getTileEntity(int x, int y, int z)
{
ChunkPosition chunkposition = new ChunkPosition(x, y, z);
TileEntity tileentity = chunkTileEntityMap.get(chunkposition);
if (tileentity == null)
{
Block block = getBlock(x, y, z);
int meta = getBlockMetadata(x, y, z);
if (block == null || !block.hasTileEntity(meta))
{
return null;
}
tileentity = block.createTileEntity(worldObj, meta);
setTileEntity(x, y, z, tileentity);
tileentity = chunkTileEntityMap.get(chunkposition);
}
return tileentity;
}
MobileChunk.java 文件源码
java
阅读 30
收藏 0
点赞 0
评论 0
项目:archimedes-ships
作者:
评论列表
文章目录