//dans generate
par1World.setBlockWithNotify(par3, par4, par5, Block.mobSpawner.blockID);
TileEntityMobSpawner var19 = (TileEntityMobSpawner)par1World.getBlockTileEntity(par3, par4, par5);
if (var19 != null)
{
var19.setMobID(this.pickMobSpawner(par2Random));
}
else
{
System.err.println("Failed to fetch mob spawner entity at (" + par3 + ", " + par4 + ", " + par5 + ")");
}
//en dehors de generate
/**
* Randomly decides which spawner to use in a dungeon
*/
private String pickMobSpawner(Random par1Random)
{
int var2 = par1Random.nextInt(4);
return var2 == 0 ? "Skeleton" : (var2 == 1 ? "Zombie" : (var2 == 2 ? "Zombie" : (var2 == 3 ? "Spider" : "")));
}