当前位置: 首页>>代码示例>>Java>>正文


Java EntityCow类代码示例

本文整理汇总了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);
}
 
开发者ID:stuebz88,项目名称:modName,代码行数:22,代码来源:BiomeScrubland.java

示例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);
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:24,代码来源:ModEntites.java

示例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;
  }
 
开发者ID:GhostMonk3408,项目名称:MidgarCrusade,代码行数:20,代码来源:BiomRoofedForest.java

示例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;
  }
 
开发者ID:GhostMonk3408,项目名称:MidgarCrusade,代码行数:22,代码来源:BiomMagicForest.java

示例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));
}
 
开发者ID:GhostMonk3408,项目名称:MidgarCrusade,代码行数:19,代码来源:EntityStymph.java

示例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);
            }
		}
	}
}
 
开发者ID:Modding-Legacy,项目名称:Aether-Legacy,代码行数:22,代码来源:AetherEventHandler.java

示例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;
}
 
开发者ID:faceofcat,项目名称:Mekfarm,代码行数:23,代码来源:AnimalWrapperFactory.java

示例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);
		}
	}
}
 
开发者ID:hero887,项目名称:Tannery,代码行数:25,代码来源:EntityDropsHandler.java

示例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);
  }
 
开发者ID:Alex-the-666,项目名称:It-s-About-Time-Minecraft-Mod,代码行数:20,代码来源:EntityVelociraptor.java

示例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));
}
 
开发者ID:NovaViper,项目名称:ZeroQuest,代码行数:26,代码来源:BiomeGenRedSeed.java

示例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)); 
}
 
开发者ID:NovaViper,项目名称:ZeroQuest,代码行数:17,代码来源:BiomeGenBioZone.java

示例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)); 
}
 
开发者ID:NovaViper,项目名称:ZeroQuest,代码行数:17,代码来源:BiomeGenBlueNile.java

示例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)); 
}
 
开发者ID:NovaViper,项目名称:ZeroQuest,代码行数:17,代码来源:BiomeGenDarkLand.java

示例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));
}
 
开发者ID:NovaViper,项目名称:ZeroQuest,代码行数:19,代码来源:BiomeGenRedSeed.java

示例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)); 
}
 
开发者ID:NovaViper,项目名称:ZeroQuest,代码行数:17,代码来源:BiomeGenBioZone.java


注:本文中的net.minecraft.entity.passive.EntityCow类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。