本文整理匯總了Java中net.minecraft.entity.passive.EntityCow類的典型用法代碼示例。如果您正苦於以下問題:Java EntityCow類的具體用法?Java EntityCow怎麽用?Java EntityCow使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
EntityCow類屬於net.minecraft.entity.passive包,在下文中一共展示了EntityCow類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: BiomeScrubland
import net.minecraft.entity.passive.EntityCow; //導入依賴的package包/類
public BiomeScrubland() {
super(new BiomeProperties("Scrubland")
.setBaseHeight(0.125f)
.setHeightVariation(0.05f)
.setTemperature(1.60f)
.setRainfall(0.00f)
.setRainDisabled()
);
this.setRegistryName(Ref.MODID+":scrubland");
this.decorator.treesPerChunk = -999;
this.decorator.deadBushPerChunk = 50;
this.decorator.reedsPerChunk = 10;
this.decorator.cactiPerChunk = 4;
this.decorator.flowersPerChunk = 2;
this.decorator.grassPerChunk = 4;
this.spawnableCreatureList.clear();
this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityCow.class, 6, 4, 4));
this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityRabbit.class, 4, 2, 3));
Ref.BIOMES.add(this);
}
示例2: postInit
import net.minecraft.entity.passive.EntityCow; //導入依賴的package包/類
public static void postInit(){
addToBiomes(EntityCrystalPigZombie.class, 50, 1, 4, EnumCreatureType.MONSTER, getBiomesThatCanSpawn(EntityPigZombie.class, EnumCreatureType.MONSTER));
addToBiomes(EntityCrystalCow.class, 6, 1, 4, EnumCreatureType.CREATURE, getBiomesThatCanSpawn(EntityCow.class, EnumCreatureType.CREATURE));
addToBiomes(EntityCrystalEnderman.class, 8, 1, 4, EnumCreatureType.MONSTER, getBiomesThatCanSpawn(EntityEnderman.class, EnumCreatureType.MONSTER));
List<Biome> angelBiomeList = getBiomesThatCanSpawn(EntityEnderman.class, EnumCreatureType.MONSTER);
Biome hell = Biome.REGISTRY.getObject(new ResourceLocation("hell"));
Biome sky = Biome.REGISTRY.getObject(new ResourceLocation("sky"));
if(sky !=null){
angelBiomeList.remove(sky);
}
if(hell !=null){
angelBiomeList.remove(hell);
List<Biome> listHell = Lists.newArrayList(hell);
addToBiomes(EntityAngel.class, 50, 4, 4, EnumCreatureType.MONSTER, listHell);
addToBiomes(EntityDevil.class, 50, 4, 4, EnumCreatureType.MONSTER, listHell);
}
addToBiomes(EntityAngel.class, 8, 1, 4, EnumCreatureType.MONSTER, angelBiomeList);
addToBiomes(EntityDevil.class, 8, 1, 4, EnumCreatureType.MONSTER, angelBiomeList);
}
示例3: BiomRoofedForest
import net.minecraft.entity.passive.EntityCow; //導入依賴的package包/類
public BiomRoofedForest(int p_i45383_1_)
{
super(p_i45383_1_);
this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityCow.class, 8, 4, 6));
this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityWolf.class, 2, 4, 6));
this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityCentaure.class, 12, 4, 6));
this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityLutin.class, 14, 4, 6));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityCaveSpider.class, 8, 2, 4));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityZombie.class, 8, 2, 4));
this.topBlock = BlockRegister.GRASS;
this.fillerBlock = BlockRegister.DIRT;
this.setBiomeName("Mystic Roofed Forest");
this.theBiomeDecorator.grassPerChunk = 16;
((BiomeDecoratorMagic) this.theBiomeDecorator).berry_per_chunk = 6;
this.theBiomeDecorator.treesPerChunk = 10;
}
示例4: BiomMagicForest
import net.minecraft.entity.passive.EntityCow; //導入依賴的package包/類
public BiomMagicForest(int p_i45383_1_)
{
super(p_i45383_1_);
this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityCow.class, 8, 4, 6));
this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityWolf.class, 2, 4, 6));
this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityStymph.class, 10, 4, 6));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityLutin.class, 14, 4, 6));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityCentaure.class, 12, 4, 6));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityCaveSpider.class, 8, 2, 4));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityZombie.class, 8, 2, 4));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityGobelin.class, 8, 2, 4));
this.topBlock = Blocks.grass;
this.fillerBlock = Blocks.dirt;
this.setBiomeName("Mystic Forest");
this.theBiomeDecorator.grassPerChunk = 16;
((BiomeDecoratorMagic) this.theBiomeDecorator).berry_per_chunk = 6;
this.theBiomeDecorator.treesPerChunk = 6;
}
示例5: EntityStymph
import net.minecraft.entity.passive.EntityCow; //導入依賴的package包/類
public EntityStymph(World w)
{
super(w);
this.setSize(0.6F, 1.4F);
this.getNavigator().setAvoidsWater(true);
this.tasks.addTask(1, new EntityAISwimming(this));
this.tasks.addTask(2, this.aiSit);
this.tasks.addTask(3, this.aiTempt = new EntityAITempt(this, 0.6D, ItemRegister.BERRY_RED, true));
this.tasks.addTask(4, new EntityAIAvoidEntity(this, EntityCow.class, 16.0F, 0.8D, 1.33D));
this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 5.0F));
this.tasks.addTask(7, new EntityAILeapAtTarget(this, 0.3F));
this.tasks.addTask(8, new EntityAIOcelotAttack(this));
this.tasks.addTask(9, new EntityAIMate(this, 0.8D));
this.tasks.addTask(10, new EntityAIWander(this, 0.8D));
this.tasks.addTask(11, new EntityAIWatchClosest(this, EntityPlayer.class, 10.0F));
this.targetTasks.addTask(1, new EntityAITargetNonTamed(this, EntitySnowCube.class, 750, false));
this.setTameSkin(this.worldObj.rand.nextInt(3));
}
示例6: onMilkedCow
import net.minecraft.entity.passive.EntityCow; //導入依賴的package包/類
@SubscribeEvent
public void onMilkedCow(EntityInteractSpecific event)
{
if (event.getTarget() instanceof EntityCow || event.getTarget() instanceof EntityFlyingCow)
{
EntityPlayer player = event.getEntityPlayer();
ItemStack heldItem = player.getHeldItem(event.getHand());
if (heldItem != null && heldItem.getItem() == ItemsAether.skyroot_bucket && EnumSkyrootBucketType.getType(heldItem.getMetadata()) == EnumSkyrootBucketType.Empty)
{
if (--heldItem.stackSize == 0)
{
player.setHeldItem(event.getHand(), new ItemStack(ItemsAether.skyroot_bucket, 1, EnumSkyrootBucketType.Milk.meta));
}
else if (!player.inventory.addItemStackToInventory(new ItemStack(ItemsAether.skyroot_bucket, 1, EnumSkyrootBucketType.Milk.meta)))
{
player.dropItem(new ItemStack(ItemsAether.skyroot_bucket, 1, EnumSkyrootBucketType.Milk.meta), false);
}
}
}
}
示例7: getAnimalWrapper
import net.minecraft.entity.passive.EntityCow; //導入依賴的package包/類
/**
* @param entity
* the entity to be wrapped
* @return
* return a nicely wrapped entity ready to be exploited in many many ways
*/
public static IAnimalWrapper getAnimalWrapper(EntityAnimal entity) {
IAnimalWrapper wrapper = null;
if (entity instanceof EntityHorse) {
wrapper = new VanillaHorse((EntityHorse) entity);
}
if ((entity instanceof EntityCow) && entity.getClass().getName().equals("com.robrit.moofluids.common.entity.EntityFluidCow")) {
wrapper = new MooFluidCow((EntityCow)entity);
}
if (wrapper == null) {
wrapper = new VanillaGenericAnimal(entity);
}
return wrapper;
}
示例8: onLivingDrops
import net.minecraft.entity.passive.EntityCow; //導入依賴的package包/類
@SubscribeEvent
public void onLivingDrops(LivingDropsEvent event)
{
Entity e = event.entity;
List<EntityItem> drops = event.drops;
// Remove all drops from cows, sheep and pigs, add carcass drop
if (e instanceof EntityCow || e instanceof EntityPig || e instanceof EntitySheep)
{
EntityAnimal a = (EntityAnimal) e;
Iterator<EntityItem> it = drops.iterator();
while (it.hasNext())
{
EntityItem i = it.next();
it.remove();
}
if (a.getGrowingAge() == 0)
{
if (a instanceof EntityCow) a.dropItem(TanneryItems.bloodyCowCarcass, 1);
else if (a instanceof EntityPig) a.dropItem(TanneryItems.bloodyPigCarcass, 1);
else if (a instanceof EntitySheep) a.dropItem(TanneryItems.bloodySheepCarcass, 1);
}
}
}
示例9: EntityVelociraptor
import net.minecraft.entity.passive.EntityCow; //導入依賴的package包/類
public EntityVelociraptor(World world)
{
super(world);
this.setSize(1F, 0.6F);
isCarnivore = true;
minSize = 0.2F;
maxSize = 1.4F;
adultAge = 10;
maxAge = 16;
this.tasks.addTask(8, new EntityAITempt(this, 1.2D, Items.chicken, false));
this.tasks.addTask(10, new MobAIWatchClosestWhenAwake(this, EntityPlayer.class, 8.0F));
this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntityChicken.class, 200, false));
this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntityCow.class, 200, false));
this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntitySheep.class, 200, false));
this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntityCompsognathus.class, 200, false));
this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntityPig.class, 200, false));
this.setTamed(false);
}
示例10: BiomeGenRedSeed
import net.minecraft.entity.passive.EntityCow; //導入依賴的package包/類
public BiomeGenRedSeed(int id) {
super(id);
this.waterColorMultiplier = 0x003333;
this.theBiomeDecorator.treesPerChunk = -999;
this.theBiomeDecorator.flowersPerChunk = 4;
this.theBiomeDecorator.grassPerChunk = 10;
this.flowers.clear();
this.addFlower(Blocks.red_flower, 4, 3);
this.addFlower(Blocks.red_flower, 5, 3);
this.addFlower(Blocks.red_flower, 6, 3);
this.addFlower(Blocks.red_flower, 7, 3);
this.addFlower(ModBlocks.nileBlackFlower, 0, 20);
this.addFlower(ModBlocks.nileBlackFlower, 3, 20);
this.addFlower(ModBlocks.nileBlackFlower, 8, 20);
this.addFlower(ModBlocks.nileBlackFlower, 0, 30);
this.spawnableMonsterList.clear();
this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityHorse.class, 5, 2, 6));
this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityRedZertum.class, 100, 4, 4));
this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityChicken.class, 5, 1, 5));
this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityCow.class, 5, 1, 5));
this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityPig.class, 5, 1, 5));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySpider.class, 100, 4, 4));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityZombie.class, 100, 4, 4));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySkeleton.class, 100, 4, 4));
}
示例11: BiomeGenBioZone
import net.minecraft.entity.passive.EntityCow; //導入依賴的package包/類
public BiomeGenBioZone(int id) {
super(id);
this.theBiomeDecorator.generateLakes = true;
this.theBiomeDecorator.treesPerChunk = 4;
this.spawnableMonsterList.clear();
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySpider.class, 100, 4, 4));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityZombie.class, 100, 4, 4));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySkeleton.class, 100, 4, 4));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityCreeper.class, 100, 4, 4));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySlime.class, 100, 4, 4));
this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityZertum.class, 100, 4, 4));
this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityBat.class, 5, 1, 5));
this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityChicken.class, 5, 1, 5));
this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityCow.class, 5, 1, 5));
this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityPig.class, 5, 1, 5));
}
示例12: BiomeGenBlueNile
import net.minecraft.entity.passive.EntityCow; //導入依賴的package包/類
public BiomeGenBlueNile(int id) {
super(id);
//topBlock = (byte)ModBlocks.nileGrass.blockID;
//fillerBlock = (byte)ModBlocks.nileDirt.blockID;
this.waterColorMultiplier = 0x003333;
this.theBiomeDecorator.treesPerChunk = 9;
this.theBiomeDecorator.grassPerChunk = 3;
this.theBiomeDecorator.flowersPerChunk = 2;
this.theBiomeDecorator.generateLakes = true;
this.spawnableMonsterList.clear();
this.spawnableCreatureList.add(new SpawnListEntry(EntityZertum.class, 100, 4, 4));
this.spawnableCreatureList.add(new SpawnListEntry(EntityBat.class, 5, 1, 5));
this.spawnableCreatureList.add(new SpawnListEntry(EntityChicken.class, 5, 1, 5));
this.spawnableCreatureList.add(new SpawnListEntry(EntityCow.class, 5, 1, 5));
this.spawnableCreatureList.add(new SpawnListEntry(EntityPig.class, 5, 1, 5));
}
示例13: BiomeGenDarkLand
import net.minecraft.entity.passive.EntityCow; //導入依賴的package包/類
public BiomeGenDarkLand(int id) {
super(id);
//topBlock = (byte)ModBlocks.nileGrass.blockID;
//fillerBlock = (byte)ModBlocks.nileDirt.blockID;
this.waterColorMultiplier = 0x666600;
this.theBiomeDecorator.treesPerChunk = 1;
this.theBiomeDecorator.grassPerChunk = 1;
this.theBiomeDecorator.flowersPerChunk = -999;
this.theBiomeDecorator.generateLakes = true;
this.spawnableMonsterList.clear();
this.spawnableCreatureList.add(new SpawnListEntry(EntityDarkZertum.class, 100, 4, 4));
this.spawnableCreatureList.add(new SpawnListEntry(EntityBat.class, 5, 1, 5));
this.spawnableCreatureList.add(new SpawnListEntry(EntityChicken.class, 5, 1, 5));
this.spawnableCreatureList.add(new SpawnListEntry(EntityCow.class, 5, 1, 5));
this.spawnableCreatureList.add(new SpawnListEntry(EntityPig.class, 5, 1, 5));
}
示例14: BiomeGenRedSeed
import net.minecraft.entity.passive.EntityCow; //導入依賴的package包/類
public BiomeGenRedSeed(int id) {
super(id);
this.waterColorMultiplier = 0x003333;
this.theBiomeDecorator.treesPerChunk = -999;
this.theBiomeDecorator.flowersPerChunk = 4;
this.theBiomeDecorator.grassPerChunk = 10;
this.flowers.clear();
this.addFlower(Blocks.red_flower.getDefaultState(), 4);
this.addFlower(ModBlocks.nileBlackFlower.getDefaultState(), 90);
this.spawnableMonsterList.clear();
this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityHorse.class, 5, 2, 6));
this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityChicken.class, 5, 1, 5));
this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityCow.class, 5, 1, 5));
this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityPig.class, 5, 1, 5));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySpider.class, 100, 4, 4));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityZombie.class, 100, 4, 4));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySkeleton.class, 100, 4, 4));
}
示例15: BiomeGenBioZone
import net.minecraft.entity.passive.EntityCow; //導入依賴的package包/類
public BiomeGenBioZone(int id) {
super(id);
this.theBiomeDecorator.generateLakes = true;
this.theBiomeDecorator.treesPerChunk = 4;
this.spawnableMonsterList.clear();
this.addFlower(ModBlocks.nileBlueFlower.getDefaultState(), 90);
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySpider.class, 100, 4, 4));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityZombie.class, 100, 4, 4));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySkeleton.class, 100, 4, 4));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityCreeper.class, 100, 4, 4));
this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySlime.class, 100, 4, 4));
this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityBat.class, 5, 1, 5));
this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityChicken.class, 5, 1, 5));
this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityCow.class, 5, 1, 5));
this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityPig.class, 5, 1, 5));
}