/**
* If needed, create a new tile entity at the given location.
*/
private void createEntity(int cx, int cy, int cz, int type) {
BlockType blockType = ItemTable.instance().getBlock(type);
if (blockType == null) return;
try {
TileEntity entity = blockType.createTileEntity(this, cx, cy, cz);
if (entity == null) return;
tileEntities.put(coordToIndex(cx, cz, cy), entity);
} catch (Exception ex) {
GlowServer.logger.log(Level.SEVERE, "Unable to initialize tile entity for " + type, ex);