net.minecraft.entity.passive.EntityOcelot Java Examples

The following examples show how to use net.minecraft.entity.passive.EntityOcelot. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Nyan.java    From CommunityMod with GNU Lesser General Public License v2.1 6 votes vote down vote up
private static Entity newNyanEntity(World world) {
	final int nextInt = random.nextInt(100);

	if(nextInt < 25) {
		return new EntityCow(world);
	}

	if(nextInt < 50) {
		return new EntityOvergrownSheep(world);
	}

	if(nextInt < 75) {
		return new EntityExplodingChicken(world);
	}

	if(nextInt < 95) {
		return new EntityOcelot(world);
	}

	if(nextInt < 99) {
		return new EntityGiantZombie(world);
	}

	return new EntityWither(world);
}
 
Example #2
Source File: MoCreatures.java    From mocreaturesdev with GNU General Public License v3.0 6 votes vote down vote up
public static void ClearVanillaSpawnLists()
{
    for (int i = 0; i < BiomeGenBase.biomeList.length; i++)
    {
        if (BiomeGenBase.biomeList[i] != null)
        {
            EntityRegistry.removeSpawn(EntityCow.class, EnumCreatureType.creature, BiomeGenBase.biomeList[i]);
            EntityRegistry.removeSpawn(EntityPig.class, EnumCreatureType.creature, BiomeGenBase.biomeList[i]);
            EntityRegistry.removeSpawn(EntitySheep.class, EnumCreatureType.creature, BiomeGenBase.biomeList[i]);
            EntityRegistry.removeSpawn(EntityChicken.class, EnumCreatureType.creature, BiomeGenBase.biomeList[i]);
            EntityRegistry.removeSpawn(EntityWolf.class, EnumCreatureType.creature, BiomeGenBase.biomeList[i]);
            EntityRegistry.removeSpawn(EntitySquid.class, EnumCreatureType.waterCreature, BiomeGenBase.biomeList[i]);
            EntityRegistry.removeSpawn(EntityOcelot.class, EnumCreatureType.creature, BiomeGenBase.biomeList[i]);
            EntityRegistry.removeSpawn(EntityBat.class, EnumCreatureType.ambient, BiomeGenBase.biomeList[i]);
        }
    }
}
 
Example #3
Source File: MoCreatures.java    From mocreaturesdev with GNU General Public License v3.0 6 votes vote down vote up
public static void ClearVanillaMobSpawns()
{
    for (int i = 0; i < BiomeGenBase.biomeList.length; i++)
    {
        if (BiomeGenBase.biomeList[i] != null)
        {
            EntityRegistry.removeSpawn(EntityCreeper.class, EnumCreatureType.monster, BiomeGenBase.biomeList[i]);
            EntityRegistry.removeSpawn(EntitySkeleton.class, EnumCreatureType.monster, BiomeGenBase.biomeList[i]);
            EntityRegistry.removeSpawn(EntityZombie.class, EnumCreatureType.monster, BiomeGenBase.biomeList[i]);
            EntityRegistry.removeSpawn(EntitySpider.class, EnumCreatureType.monster, BiomeGenBase.biomeList[i]);
            EntityRegistry.removeSpawn(EntityEnderman.class, EnumCreatureType.monster, BiomeGenBase.biomeList[i]);
            EntityRegistry.removeSpawn(EntityCaveSpider.class, EnumCreatureType.monster, BiomeGenBase.biomeList[i]);
            EntityRegistry.removeSpawn(EntitySlime.class, EnumCreatureType.monster, BiomeGenBase.biomeList[i]);
            EntityRegistry.removeSpawn(EntityGhast.class, EnumCreatureType.monster, BiomeGenBase.biomeList[i]);
            EntityRegistry.removeSpawn(EntityPigZombie.class, EnumCreatureType.monster, BiomeGenBase.biomeList[i]);
            EntityRegistry.removeSpawn(EntityMagmaCube.class, EnumCreatureType.monster, BiomeGenBase.biomeList[i]);
            EntityRegistry.removeSpawn(EntityOcelot.class, EnumCreatureType.monster, BiomeGenBase.biomeList[i]);
        }
    }
}
 
Example #4
Source File: CustomSpawner.java    From mocreaturesdev with GNU General Public License v3.0 6 votes vote down vote up
public final int despawnVanillaAnimals(WorldServer worldObj)
{
    int count = 0;
    for (int j = 0; j < worldObj.loadedEntityList.size(); j++)
    {
        Entity entity = (Entity) worldObj.loadedEntityList.get(j);
        if (!(entity instanceof EntityLiving))
        {
            continue;
        }
        if ((entity instanceof EntityCow || entity instanceof EntitySheep || entity instanceof EntityPig || entity instanceof EntityOcelot || entity instanceof EntityChicken || entity instanceof EntitySquid || entity instanceof EntityWolf))
        {
            count += entityDespawnCheck(worldObj, (EntityLiving) entity);

        }
    }
    return count;
}
 
Example #5
Source File: BiomeMiniJungle.java    From CommunityMod with GNU Lesser General Public License v2.1 5 votes vote down vote up
public BiomeMiniJungle() {
    super(properties);
    decorator.treesPerChunk = 30;
    decorator.flowersPerChunk = 5;
    decorator.grassPerChunk = 25;
    decorator.reedsPerChunk = 2;
    decorator.clayPerChunk = 3;
    decorator.waterlilyPerChunk = 12;

    this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntityOcelot.class, 1, 1, 1));
    this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityChicken.class, 4, 4, 4));
    this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityParrot.class, 40, 1, 2));

}
 
Example #6
Source File: BiomeMiniJungle.java    From Traverse-Legacy-1-12-2 with MIT License 5 votes vote down vote up
public BiomeMiniJungle() {
    super(properties);
    decorator.treesPerChunk = 30;
    decorator.flowersPerChunk = 5;
    decorator.grassPerChunk = 25;
    decorator.reedsPerChunk = 2;
    decorator.clayPerChunk = 3;
    decorator.waterlilyPerChunk = 12;

    this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntityOcelot.class, 1, 1, 1));
    this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityChicken.class, 4, 4, 4));
    this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityParrot.class, 40, 1, 2));

}
 
Example #7
Source File: CustomSpawner.java    From mocreaturesdev with GNU General Public License v3.0 5 votes vote down vote up
public CustomSpawner()
{
    biomeList = new ArrayList<BiomeGenBase>();
    log.setParent(FMLLog.getLogger());
    try
    {
        for (BiomeGenBase biomegenbase : BiomeGenBase.biomeList)
        {
            if (biomegenbase == null)
            {
                continue;
            }
            biomeList.add(biomegenbase);
        }

        customCreatureSpawnList = new List[biomeList.size()];
        customMobSpawnList = new List[biomeList.size()];
        customAmbientSpawnList = new List[biomeList.size()];
        customAquaticSpawnList = new List[biomeList.size()];
        entityClasses = new List[4];
        vanillaClassList = new ArrayList<Class>();
        vanillaClassList.add(EntityChicken.class);
        vanillaClassList.add(EntityCow.class);
        vanillaClassList.add(EntityPig.class);
        vanillaClassList.add(EntitySheep.class);
        vanillaClassList.add(EntityWolf.class);
        vanillaClassList.add(EntitySquid.class);
        vanillaClassList.add(EntityOcelot.class);
        vanillaClassList.add(EntityBat.class);
        clearLists();
    }
    catch (Exception ex)
    {
        throw new RuntimeException(ex);
    }
}
 
Example #8
Source File: CraftOcelot.java    From Kettle with GNU General Public License v3.0 4 votes vote down vote up
public CraftOcelot(CraftServer server, EntityOcelot ocelot) {
    super(server, ocelot);
}
 
Example #9
Source File: CraftOcelot.java    From Kettle with GNU General Public License v3.0 4 votes vote down vote up
@Override
public EntityOcelot getHandle() {
    return (EntityOcelot) entity;
}