001package net.minecraft.world.gen.structure;
002
003import java.util.ArrayList;
004import java.util.List;
005import net.minecraft.entity.monster.EntityBlaze;
006import net.minecraft.entity.monster.EntityMagmaCube;
007import net.minecraft.entity.monster.EntityPigZombie;
008import net.minecraft.entity.monster.EntitySkeleton;
009import net.minecraft.world.biome.SpawnListEntry;
010
011public class MapGenNetherBridge extends MapGenStructure
012{
013    private List spawnList = new ArrayList();
014
015    public MapGenNetherBridge()
016    {
017        this.spawnList.add(new SpawnListEntry(EntityBlaze.class, 10, 2, 3));
018        this.spawnList.add(new SpawnListEntry(EntityPigZombie.class, 5, 4, 4));
019        this.spawnList.add(new SpawnListEntry(EntitySkeleton.class, 10, 4, 4));
020        this.spawnList.add(new SpawnListEntry(EntityMagmaCube.class, 3, 4, 4));
021    }
022
023    public List getSpawnList()
024    {
025        return this.spawnList;
026    }
027
028    protected boolean canSpawnStructureAtCoords(int par1, int par2)
029    {
030        int var3 = par1 >> 4;
031        int var4 = par2 >> 4;
032        this.rand.setSeed((long)(var3 ^ var4 << 4) ^ this.worldObj.getSeed());
033        this.rand.nextInt();
034        return this.rand.nextInt(3) != 0 ? false : (par1 != (var3 << 4) + 4 + this.rand.nextInt(8) ? false : par2 == (var4 << 4) + 4 + this.rand.nextInt(8));
035    }
036
037    protected StructureStart getStructureStart(int par1, int par2)
038    {
039        return new StructureNetherBridgeStart(this.worldObj, this.rand, par1, par2);
040    }
041}