Really specific.
On Topic: Is this an efficient way of doing it? I can't find any other way yet.
public class CustomWorldGenerator implements IWorldGenerator {
@Override
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
Chunk chunk = world.getChunkFromChunkCoords(chunkX, chunkZ);
Map<ChunkPosition, TileEntity> chunktiles = chunk.chunkTileEntityMap;
for(Map.Entry<ChunkPosition, TileEntity> map : chunktiles.entrySet()){
if(map.getValue().blockType.equals(Block.chest)){
TileEntity tileentity = map.getValue();
chunk.chunkTileEntityMap.remove(tileentity);
if(tileentity != null){
tileentity.invalidate();
}
}
}
}
}