Java 类net.minecraft.entity.passive.EntityCow 实例源码

项目:modName    文件:BiomeScrubland.java   
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);
}
项目:CrystalMod    文件:ModEntites.java   
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);
}
项目:MidgarCrusade    文件:BiomRoofedForest.java   
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;
  }
项目:MidgarCrusade    文件:BiomMagicForest.java   
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;
  }
项目:MidgarCrusade    文件:EntityStymph.java   
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));
}
项目:Aether-Legacy    文件:AetherEventHandler.java   
@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);
            }
        }
    }
}
项目:Mekfarm    文件:AnimalWrapperFactory.java   
/**
 * @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;
}
项目:Tannery    文件:EntityDropsHandler.java   
@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);
        }
    }
}
项目:It-s-About-Time-Minecraft-Mod    文件:EntityVelociraptor.java   
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);
  }
项目:ZeroQuest    文件:BiomeGenRedSeed.java   
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));
}
项目:ZeroQuest    文件:BiomeGenBioZone.java   
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)); 
}
项目:ZeroQuest    文件:BiomeGenBlueNile.java   
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)); 
}
项目:ZeroQuest    文件:BiomeGenDarkLand.java   
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)); 
}
项目:ZeroQuest    文件:BiomeGenRedSeed.java   
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));
}
项目:ZeroQuest    文件:BiomeGenBioZone.java   
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)); 
}
项目:reptiles    文件:EntityMegalania.java   
public EntityMegalania(World world) {
    super(world);
    float scaleFactor = 2.5f;
    setSize(1.0F * scaleFactor, 0.6F * scaleFactor);
    setPathPriority(PathNodeType.WATER, 0.0f);
    setHealth(60.0f);

    tasks.addTask(0, new EntityAISwimming(this));
    tasks.addTask(1, new EntityAILeapAtTarget(this, 0.4F));
    tasks.addTask(2, new EntityAIAttackMelee(this, 1.0D, true));
    tasks.addTask(3, new EntityAIWander(this, 0.9));
    tasks.addTask(4, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
    tasks.addTask(5, new EntityAILookIdle(this));

    targetTasks.addTask(1, new EntityAIHurtByTarget(this, true));
    targetTasks.addTask(2, new EntityAINearestAttackableTarget<>(this, EntityChicken.class, true));
    targetTasks.addTask(3, new EntityAINearestAttackableTarget<>(this, EntityPig.class, true));
    targetTasks.addTask(4, new EntityAINearestAttackableTarget<>(this, EntityPlayer.class, true));
    targetTasks.addTask(5, new EntityAINearestAttackableTarget<>(this, EntitySheep.class, true));
    targetTasks.addTask(6, new EntityAINearestAttackableTarget<>(this, EntityCow.class, true));
    targetTasks.addTask(7, new EntityAINearestAttackableTarget<>(this, EntitySkeleton.class, true));
    targetTasks.addTask(8, new EntityAINearestAttackableTarget<>(this, EntityRabbit.class, true));
}
项目:RideableCows    文件:ItemWheatOnAStick.java   
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) {
    if (player.isRiding() && player.ridingEntity instanceof EntityCow) {
        EntityCow cow = (EntityCow) player.ridingEntity;

        if (RideableCows.getAIControlledByPlayer(cow).isControlledByPlayer() && itemstack.getMaxDamage() - itemstack.getItemDamage() >= 7) {
            RideableCows.getAIControlledByPlayer(cow).boostSpeed();
            itemstack.damageItem(7, player);

            if (itemstack.stackSize == 0) {
                ItemStack itemstack1 = new ItemStack(Items.fishing_rod);
                itemstack1.setTagCompound(itemstack.stackTagCompound);
                return itemstack1;
            }
        }
    }

    return itemstack;
}
项目:RideableCows    文件:CommonProxy.java   
@SubscribeEvent
public void spawnEntity(EntityJoinWorldEvent event) {
    if (event.entity instanceof EntityCow) {
        EntityCow cow = (EntityCow) event.entity;
        cow.tasks.addTask(getPriorityOfTask(cow, EntityAITempt.class), new EntityAITempt(cow, 1.2D, RideableCows.wheat_on_a_stick, false));

        int controlPriority = getPriorityOfTask(cow, EntityAIMate.class);
        for (Object obj : cow.tasks.taskEntries) {
            EntityAITasks.EntityAITaskEntry taskEntry = (EntityAITasks.EntityAITaskEntry) obj;
            if (taskEntry.priority >= controlPriority) ++taskEntry.priority;
        }
        cow.tasks.addTask(controlPriority, new EntityAICowControlledByPlayer(cow, 0.45F));
    } else if (event.entity instanceof EntitySheep) {
        EntitySheep sheep = (EntitySheep) event.entity;
        sheep.tasks.addTask(getPriorityOfTask(sheep, EntityAITempt.class), new EntityAITempt(sheep, 1.1D, RideableCows.wheat_on_a_stick, false));
    }
}
项目:The-Derpy-Shiz-Mod    文件:MagicBiomeGen.java   
public MagicBiomeGen(int id) {
    super(id);
    this.setHeight(new Height(-0.1f,0.2f));
    this.setColor(0xDB14AD);
       this.setTemperatureRainfall(0.5F, 0.9F);
       this.waterColorMultiplier = 0xDB14AD;
       this.theBiomeDecorator.bigMushroomsPerChunk = 1;
       this.theBiomeDecorator.flowersPerChunk = 10;
       this.theBiomeDecorator.grassPerChunk = 1;
       this.theBiomeDecorator.treesPerChunk = 0;
    this.theBiomeDecorator.sandPerChunk = -999;
    this.theBiomeDecorator.sandPerChunk2 = -999;
    this.theBiomeDecorator.mushroomsPerChunk = 10;

    this.biomeName = "Magic Forest";

    this.spawnableCreatureList.clear();
    this.spawnableCreatureList.add(new SpawnListEntry(EntityPiggycorn.class,20,2,6));
    this.spawnableCreatureList.add(new SpawnListEntry(EntityPig.class,10,1,10));
    this.spawnableCreatureList.add(new SpawnListEntry(EntityCow.class,5,5,7));

    this.spawnableMonsterList.add(new SpawnListEntry(EntityWitch.class,3,1,2));

    //this.theBiomeDecorator
}
项目:PneumaticCraft    文件:HackableHandler.java   
public static void addDefaultEntries(){
    PneumaticRegistry.getInstance().addHackable(Blocks.tnt, HackableTNT.class);
    PneumaticRegistry.getInstance().addHackable(Blocks.mob_spawner, HackableMobSpawner.class);
    PneumaticRegistry.getInstance().addHackable(Blocks.lever, HackableLever.class);
    PneumaticRegistry.getInstance().addHackable(Blocks.stone_button, HackableButton.class);
    PneumaticRegistry.getInstance().addHackable(Blocks.wooden_button, HackableButton.class);
    PneumaticRegistry.getInstance().addHackable(Blocks.wooden_door, HackableDoor.class);
    PneumaticRegistry.getInstance().addHackable(Blocks.tripwire_hook, HackableTripwire.class);
    PneumaticRegistry.getInstance().addHackable(Blocks.dispenser, HackableDispenser.class);
    PneumaticRegistry.getInstance().addHackable(Blocks.dropper, HackableDispenser.class);
    PneumaticRegistry.getInstance().addHackable(Blockss.securityStation, HackableSecurityStation.class);
    PneumaticRegistry.getInstance().addHackable(Blocks.monster_egg, HackableTripwire.class);
    PneumaticRegistry.getInstance().addHackable(Blocks.noteblock, HackableNoteblock.class);
    PneumaticRegistry.getInstance().addHackable(Blocks.jukebox, HackableJukebox.class);

    PneumaticRegistry.getInstance().addHackable(EntityCreeper.class, HackableCreeper.class);
    PneumaticRegistry.getInstance().addHackable(EntityTameable.class, HackableTameable.class);
    PneumaticRegistry.getInstance().addHackable(EntityCow.class, HackableCow.class);
    PneumaticRegistry.getInstance().addHackable(EntityCaveSpider.class, HackableCaveSpider.class);
    PneumaticRegistry.getInstance().addHackable(EntityBlaze.class, HackableBlaze.class);
    PneumaticRegistry.getInstance().addHackable(EntityGhast.class, HackableGhast.class);
    PneumaticRegistry.getInstance().addHackable(EntityWitch.class, HackableWitch.class);
    PneumaticRegistry.getInstance().addHackable(EntityLiving.class, HackableLivingDisarm.class);
    PneumaticRegistry.getInstance().addHackable(EntityEnderman.class, HackableEnderman.class);
    PneumaticRegistry.getInstance().addHackable(EntityBat.class, HackableBat.class);
}
项目:Amitcraft    文件:EntityTComp.java   
public EntityTComp(World par1World) {
    super(par1World);
    this.texture = AmitReference.Sprites.MOB_TEXTURE_PATH + "TComp.png";
    this.moveSpeed = this.stepHeight = 1.0F;

    this.moveSpeed = 0.75F;
    this.stepHeight = 2.0F;

    this.getNavigator().setBreakDoors(true);
    this.getNavigator().setAvoidsWater(true);
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIArrowAttack(this, 0.25F, 20, 10.0F));
    this.tasks.addTask(1, new EntityAIWander(this, 0.3F));
    this.tasks.addTask(2, new EntityAIAvoidEntity(this, EntityZombie.class, 8.0F, 0.3F, 0.35F));
    this.tasks.addTask(3, new EntityAIMoveIndoors(this));
    this.tasks.addTask(4, new EntityAIRestrictOpenDoor(this));
    this.tasks.addTask(5, new EntityAIOpenDoor(this, true));
    this.tasks.addTask(6, new EntityAIMoveTwardsRestriction(this, 0.3F));
    this.tasks.addTask(7, new EntityAIWatchClosest2(this, EntityPlayer.class, 3.0F, 1.0F));
    this.tasks.addTask(8, new EntityAIWatchClosest2(this, EntityCow.class, 5.0F, 0.02F));
    this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityLiving.class, 8.0F));
    this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true));
    this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityMob.class, 16.0F, 0, false));
    this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityCreeper.class, 16.0F, 0, false));
    this.targetTasks.addTask(4, new EntityAINearestAttackableTarget(this, EntityLiving.class, 16.0F, 0, false, true, IMob.mobSelector));
}
项目:pnc-repressurized    文件:HackableCow.java   
@Override
public void onHackFinished(Entity entity, EntityPlayer player) {
    if (!entity.world.isRemote) {
        entity.setDead();
        EntityMooshroom entitycow = new EntityMooshroom(entity.world);
        entitycow.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
        entitycow.setHealth(((EntityCow) entity).getHealth());
        entitycow.renderYawOffset = ((EntityCow) entity).renderYawOffset;
        entity.world.spawnEntity(entitycow);
        entity.world.spawnParticle(EnumParticleTypes.EXPLOSION_HUGE, entity.posX, entity.posY + entity.height / 2.0F, entity.posZ, 0.0D, 0.0D, 0.0D);
    }
}
项目:pnc-repressurized    文件:HackableHandler.java   
public static void addDefaultEntries() {
    IPneumaticHelmetRegistry manager = PneumaticRegistry.getInstance().getHelmetRegistry();
    manager.addHackable(Blocks.TNT, HackableTNT.class);
    manager.addHackable(Blocks.MOB_SPAWNER, HackableMobSpawner.class);
    manager.addHackable(Blocks.LEVER, HackableLever.class);
    manager.addHackable(Blocks.STONE_BUTTON, HackableButton.class);
    manager.addHackable(Blocks.WOODEN_BUTTON, HackableButton.class);
    manager.addHackable(Blocks.OAK_DOOR, HackableDoor.class);
    manager.addHackable(Blocks.SPRUCE_DOOR, HackableDoor.class);
    manager.addHackable(Blocks.BIRCH_DOOR, HackableDoor.class);
    manager.addHackable(Blocks.JUNGLE_DOOR, HackableDoor.class);
    manager.addHackable(Blocks.ACACIA_DOOR, HackableDoor.class);
    manager.addHackable(Blocks.DARK_OAK_DOOR, HackableDoor.class);
    manager.addHackable(Blocks.TRIPWIRE_HOOK, HackableTripwire.class);
    manager.addHackable(Blocks.DISPENSER, HackableDispenser.class);
    manager.addHackable(Blocks.DROPPER, HackableDispenser.class);
    manager.addHackable(Blockss.SECURITY_STATION, HackableSecurityStation.class);
    manager.addHackable(Blocks.MONSTER_EGG, HackableSilverfish.class);
    manager.addHackable(Blocks.NOTEBLOCK, HackableNoteblock.class);
    manager.addHackable(Blocks.JUKEBOX, HackableJukebox.class);

    manager.addHackable(EntityCreeper.class, HackableCreeper.class);
    manager.addHackable(EntityTameable.class, HackableTameable.class);
    manager.addHackable(EntityCow.class, HackableCow.class);
    manager.addHackable(EntityCaveSpider.class, HackableCaveSpider.class);
    manager.addHackable(EntityBlaze.class, HackableBlaze.class);
    manager.addHackable(EntityGhast.class, HackableGhast.class);
    manager.addHackable(EntityWitch.class, HackableWitch.class);
    manager.addHackable(EntityLiving.class, HackableLivingDisarm.class);
    manager.addHackable(EntityEnderman.class, HackableEnderman.class);
    manager.addHackable(EntityBat.class, HackableBat.class);
}
项目:Bewitchment    文件:GrassGrowBrew.java   
@Override
public void apply(World world, BlockPos pos, EntityLivingBase entity, int amplifier, int tick) {
    if (entity instanceof EntityMooshroom) {
        EntityCow cow = new EntityCow(world);
        cow.setPosition(pos.getX(), pos.getY(), pos.getZ());
        entity.setDead();
        world.spawnEntity(cow);
    }
}
项目:Bewitchment    文件:MycologicalCorruptionBrew.java   
@Override
public void apply(World world, BlockPos pos, EntityLivingBase entity, int amplifier, int tick) {
    if (entity instanceof EntityCow & !(entity instanceof EntityMooshroom)) {
        EntityMooshroom mooshroom = new EntityMooshroom(world);
        mooshroom.setPosition(pos.getX(), pos.getY(), pos.getZ());
        entity.setDead();
        world.spawnEntity(mooshroom);
    }
}
项目:harshencastle    文件:HandlerGlassContainer.java   
@SubscribeEvent
public void onEntityRightClick(PlayerInteractEvent.EntityInteract event)
{
    if(event.getEntityPlayer().getHeldItemMainhand().isItemEqual(new ItemStack(HarshenItems.GLASS_CONTAINER)) && event.getTarget().getClass() == EntityCow.class)
        event.getEntityPlayer().setHeldItem(EnumHand.MAIN_HAND, GlassContainerValues.MILK.getStack());

}
项目:DecompiledMinecraft    文件:BiomeGenBase.java   
protected BiomeGenBase(int id)
{
    this.minHeight = height_Default.rootHeight;
    this.maxHeight = height_Default.variation;
    this.temperature = 0.5F;
    this.rainfall = 0.5F;
    this.waterColorMultiplier = 16777215;
    this.spawnableMonsterList = Lists.<BiomeGenBase.SpawnListEntry>newArrayList();
    this.spawnableCreatureList = Lists.<BiomeGenBase.SpawnListEntry>newArrayList();
    this.spawnableWaterCreatureList = Lists.<BiomeGenBase.SpawnListEntry>newArrayList();
    this.spawnableCaveCreatureList = Lists.<BiomeGenBase.SpawnListEntry>newArrayList();
    this.enableRain = true;
    this.worldGeneratorTrees = new WorldGenTrees(false);
    this.worldGeneratorBigTree = new WorldGenBigTree(false);
    this.worldGeneratorSwamp = new WorldGenSwamp();
    this.biomeID = id;
    biomeList[id] = this;
    this.theBiomeDecorator = this.createBiomeDecorator();
    this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntitySheep.class, 12, 4, 4));
    this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityRabbit.class, 10, 3, 3));
    this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityPig.class, 10, 4, 4));
    this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityChicken.class, 10, 4, 4));
    this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityCow.class, 8, 4, 4));
    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.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityEnderman.class, 10, 1, 4));
    this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityWitch.class, 5, 1, 1));
    this.spawnableWaterCreatureList.add(new BiomeGenBase.SpawnListEntry(EntitySquid.class, 10, 4, 4));
    this.spawnableCaveCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityBat.class, 10, 8, 8));
}
项目:DecompiledMinecraft    文件:BiomeGenBase.java   
protected BiomeGenBase(int id)
{
    this.minHeight = height_Default.rootHeight;
    this.maxHeight = height_Default.variation;
    this.temperature = 0.5F;
    this.rainfall = 0.5F;
    this.waterColorMultiplier = 16777215;
    this.spawnableMonsterList = Lists.<BiomeGenBase.SpawnListEntry>newArrayList();
    this.spawnableCreatureList = Lists.<BiomeGenBase.SpawnListEntry>newArrayList();
    this.spawnableWaterCreatureList = Lists.<BiomeGenBase.SpawnListEntry>newArrayList();
    this.spawnableCaveCreatureList = Lists.<BiomeGenBase.SpawnListEntry>newArrayList();
    this.enableRain = true;
    this.worldGeneratorTrees = new WorldGenTrees(false);
    this.worldGeneratorBigTree = new WorldGenBigTree(false);
    this.worldGeneratorSwamp = new WorldGenSwamp();
    this.biomeID = id;
    biomeList[id] = this;
    this.theBiomeDecorator = this.createBiomeDecorator();
    this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntitySheep.class, 12, 4, 4));
    this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityRabbit.class, 10, 3, 3));
    this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityPig.class, 10, 4, 4));
    this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityChicken.class, 10, 4, 4));
    this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityCow.class, 8, 4, 4));
    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.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityEnderman.class, 10, 1, 4));
    this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityWitch.class, 5, 1, 1));
    this.spawnableWaterCreatureList.add(new BiomeGenBase.SpawnListEntry(EntitySquid.class, 10, 4, 4));
    this.spawnableCaveCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityBat.class, 10, 8, 8));
}
项目:BaseClient    文件:BiomeGenBase.java   
protected BiomeGenBase(int id)
{
    this.minHeight = height_Default.rootHeight;
    this.maxHeight = height_Default.variation;
    this.temperature = 0.5F;
    this.rainfall = 0.5F;
    this.waterColorMultiplier = 16777215;
    this.spawnableMonsterList = Lists.<BiomeGenBase.SpawnListEntry>newArrayList();
    this.spawnableCreatureList = Lists.<BiomeGenBase.SpawnListEntry>newArrayList();
    this.spawnableWaterCreatureList = Lists.<BiomeGenBase.SpawnListEntry>newArrayList();
    this.spawnableCaveCreatureList = Lists.<BiomeGenBase.SpawnListEntry>newArrayList();
    this.enableRain = true;
    this.worldGeneratorTrees = new WorldGenTrees(false);
    this.worldGeneratorBigTree = new WorldGenBigTree(false);
    this.worldGeneratorSwamp = new WorldGenSwamp();
    this.biomeID = id;
    biomeList[id] = this;
    this.theBiomeDecorator = this.createBiomeDecorator();
    this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntitySheep.class, 12, 4, 4));
    this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityRabbit.class, 10, 3, 3));
    this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityPig.class, 10, 4, 4));
    this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityChicken.class, 10, 4, 4));
    this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityCow.class, 8, 4, 4));
    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.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityEnderman.class, 10, 1, 4));
    this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityWitch.class, 5, 1, 1));
    this.spawnableWaterCreatureList.add(new BiomeGenBase.SpawnListEntry(EntitySquid.class, 10, 4, 4));
    this.spawnableCaveCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityBat.class, 10, 8, 8));
}
项目:BaseClient    文件:BiomeGenBase.java   
protected BiomeGenBase(int id)
{
    this.minHeight = height_Default.rootHeight;
    this.maxHeight = height_Default.variation;
    this.temperature = 0.5F;
    this.rainfall = 0.5F;
    this.waterColorMultiplier = 16777215;
    this.spawnableMonsterList = Lists.<BiomeGenBase.SpawnListEntry>newArrayList();
    this.spawnableCreatureList = Lists.<BiomeGenBase.SpawnListEntry>newArrayList();
    this.spawnableWaterCreatureList = Lists.<BiomeGenBase.SpawnListEntry>newArrayList();
    this.spawnableCaveCreatureList = Lists.<BiomeGenBase.SpawnListEntry>newArrayList();
    this.enableRain = true;
    this.worldGeneratorTrees = new WorldGenTrees(false);
    this.worldGeneratorBigTree = new WorldGenBigTree(false);
    this.worldGeneratorSwamp = new WorldGenSwamp();
    this.biomeID = id;
    biomeList[id] = this;
    this.theBiomeDecorator = this.createBiomeDecorator();
    this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntitySheep.class, 12, 4, 4));
    this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityRabbit.class, 10, 3, 3));
    this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityPig.class, 10, 4, 4));
    this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityChicken.class, 10, 4, 4));
    this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityCow.class, 8, 4, 4));
    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.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityEnderman.class, 10, 1, 4));
    this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityWitch.class, 5, 1, 1));
    this.spawnableWaterCreatureList.add(new BiomeGenBase.SpawnListEntry(EntitySquid.class, 10, 4, 4));
    this.spawnableCaveCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityBat.class, 10, 8, 8));
}
项目:Backmemed    文件:Biome.java   
protected Biome(Biome.BiomeProperties properties)
{
    this.biomeName = properties.biomeName;
    this.baseHeight = properties.baseHeight;
    this.heightVariation = properties.heightVariation;
    this.temperature = properties.temperature;
    this.rainfall = properties.rainfall;
    this.waterColor = properties.waterColor;
    this.enableSnow = properties.enableSnow;
    this.enableRain = properties.enableRain;
    this.baseBiomeRegName = properties.baseBiomeRegName;
    this.theBiomeDecorator = this.createBiomeDecorator();
    this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntitySheep.class, 12, 4, 4));
    this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityPig.class, 10, 4, 4));
    this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityChicken.class, 10, 4, 4));
    this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityCow.class, 8, 4, 4));
    this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntitySpider.class, 100, 4, 4));
    this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntityZombie.class, 95, 4, 4));
    this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntityZombieVillager.class, 5, 1, 1));
    this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntitySkeleton.class, 100, 4, 4));
    this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntityCreeper.class, 100, 4, 4));
    this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntitySlime.class, 100, 4, 4));
    this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntityEnderman.class, 10, 1, 4));
    this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntityWitch.class, 5, 1, 1));
    this.spawnableWaterCreatureList.add(new Biome.SpawnListEntry(EntitySquid.class, 10, 4, 4));
    this.spawnableCaveCreatureList.add(new Biome.SpawnListEntry(EntityBat.class, 10, 8, 8));
}
项目:IceMod    文件:IceLands.java   
public IceLands(int par1)
{
    super(par1);

    this.setBiomeName("Icelands");

    this.topBlock = (byte)IceMod.IcyOre.blockID;
    this.fillerBlock = (byte)Block.ice.blockID;

    this.theBiomeDecorator.bigMushroomsPerChunk = 10;
    this.theBiomeDecorator.treesPerChunk = 5;
    this.theBiomeDecorator.clayPerChunk  = 3;
    this.theBiomeDecorator.reedsPerChunk = 1;

    this.spawnableMonsterList.add(new SpawnListEntry(EntitySnowman.class, 25, 4, 8));
    this.spawnableCreatureList.add(new SpawnListEntry(EntityCow.class, 25, 4, 8));
    this.spawnableMonsterList.add(new SpawnListEntry(EntityDragon.class, 1, 1, 1));
    this.spawnableMonsterList.add(new SpawnListEntry(EntityIronGolem.class, 1, 1, 1));

    this.setMinMaxHeight(0.1F, 0.5F);
    //mnmx
    this.setTemperatureRainfall(0.7F, 0.2F);

}
项目:CustomWorldGen    文件:Biome.java   
public Biome(Biome.BiomeProperties properties)
{
    this.biomeName = properties.biomeName;
    this.baseHeight = properties.baseHeight;
    this.heightVariation = properties.heightVariation;
    this.temperature = properties.temperature;
    this.rainfall = properties.rainfall;
    this.waterColor = properties.waterColor;
    this.enableSnow = properties.enableSnow;
    this.enableRain = properties.enableRain;
    this.baseBiomeRegName = properties.baseBiomeRegName;
    this.theBiomeDecorator = this.createBiomeDecorator();
    this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntitySheep.class, 12, 4, 4));
    this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityPig.class, 10, 4, 4));
    this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityChicken.class, 10, 4, 4));
    this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityCow.class, 8, 4, 4));
    this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntitySpider.class, 100, 4, 4));
    this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntityZombie.class, 100, 4, 4));
    this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntitySkeleton.class, 100, 4, 4));
    this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntityCreeper.class, 100, 4, 4));
    this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntitySlime.class, 100, 4, 4));
    this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntityEnderman.class, 10, 1, 4));
    this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntityWitch.class, 5, 1, 1));
    this.spawnableWaterCreatureList.add(new Biome.SpawnListEntry(EntitySquid.class, 10, 4, 4));
    this.spawnableCaveCreatureList.add(new Biome.SpawnListEntry(EntityBat.class, 10, 8, 8));
    this.addDefaultFlowers();
}
项目:Possessed    文件:PossessHandler.java   
public static void onPreInit() {
    PossessHandler.registerHandler(new BlazeHandler());
    PossessHandler.registerHandler(new ChickenHandler());
    PossessHandler.registerHandler(new CreeperHandler());
    PossessHandler.registerHandler(new DragonHandler());
    PossessHandler.registerHandler(new EndermanHandler());
    PossessHandler.registerHandler(new FlyingHandler(EntityFlying.class, new ResourceLocation(Possessed.MODID, "flying")));
    PossessHandler.registerHandler(new FlyingHandler(EntityBat.class, new ResourceLocation(Possessed.MODID, "bat_flying")));
    PossessHandler.registerHandler(new FlyingHandler(EntityBlaze.class, new ResourceLocation(Possessed.MODID, "blaze_flying")));
    PossessHandler.registerHandler(new GhastHandler());
    PossessHandler.registerHandler(new GrassEatHandler(EntityCow.class, new ResourceLocation(Possessed.MODID, "cow_grass")));
    PossessHandler.registerHandler(new GrassEatHandler(EntityChicken.class, new ResourceLocation(Possessed.MODID, "chicken_grass")));
    PossessHandler.registerHandler(new GrassEatHandler(EntityPig.class, new ResourceLocation(Possessed.MODID, "pig_grass")));
    PossessHandler.registerHandler(new GrassEatHandler(EntityHorse.class, new ResourceLocation(Possessed.MODID, "horse_grass")));
    PossessHandler.registerHandler(new GuardianHandler());
    PossessHandler.registerHandler(new IronGolemHandler());
    PossessHandler.registerHandler(new OcelotHandler());
    PossessHandler.registerHandler(new PolarBearHandler());
    PossessHandler.registerHandler(new RabbitHandler());
    PossessHandler.registerHandler(new SheepHandler());
    PossessHandler.registerHandler(new ShulkerHandler());
    PossessHandler.registerHandler(new SkeletonHandler());
    PossessHandler.registerHandler(new SlimeHandler());
    PossessHandler.registerHandler(new SnowmanHandler());
    PossessHandler.registerHandler(new SpiderHandler());
    PossessHandler.registerHandler(new SquidHandler());
    PossessHandler.registerHandler(new WaterMobHandler());
    PossessHandler.registerHandler(new WitherHandler());
    PossessHandler.registerHandler(new ZombieHandler());
}
项目:4Space-5    文件:TeleportTypeAsteroids.java   
@Override
public void setupAdventureSpawn(EntityPlayerMP player)
{
       GCPlayerStats stats = GCPlayerStats.get(player);
       SchematicRegistry.unlockNewPage(player, new ItemStack(GCItems.schematic, 1, 1)); //Knows how to build T2 rocket
       SchematicRegistry.unlockNewPage(player, new ItemStack(MarsItems.schematic, 1, 0)); //Knows how to build T3 rocket
       SchematicRegistry.unlockNewPage(player, new ItemStack(MarsItems.schematic, 1, 2)); //Knows how to build Astro Miner
       stats.rocketStacks = new ItemStack[20];
       stats.fuelLevel = 1000;
       int i = 0;
       stats.rocketStacks[i++] = new ItemStack(GCItems.oxMask);
       stats.rocketStacks[i++] = new ItemStack(GCItems.oxygenGear);
       stats.rocketStacks[i++] = new ItemStack(GCItems.oxTankMedium);
       stats.rocketStacks[i++] = new ItemStack(GCItems.oxTankHeavy);
       stats.rocketStacks[i++] = new ItemStack(GCItems.oxTankHeavy);
       stats.rocketStacks[i++] = new ItemStack(AsteroidsItems.canisterLOX);
       stats.rocketStacks[i++] = new ItemStack(AsteroidsItems.canisterLOX);
       stats.rocketStacks[i++] = new ItemStack(AsteroidsItems.canisterLOX);
       stats.rocketStacks[i++] = new ItemStack(AsteroidsItems.basicItem, 32, 7);
       stats.rocketStacks[i++] = new ItemStack(Blocks.glass_pane, 16);
       stats.rocketStacks[i++] = new ItemStack(Blocks.planks, 32, 2);
       stats.rocketStacks[i++] = new ItemStack(MarsItems.marsItemBasic, 16, 2); //Desh ingot
       stats.rocketStacks[i++] = new ItemStack(GCItems.basicItem, 8, 13); //Basic Wafer
       stats.rocketStacks[i++] = new ItemStack(GCItems.basicItem, 2, 1); //Solar Panels
       stats.rocketStacks[i++] = new ItemStack(GCItems.basicItem, 16, 15);  //Canned food
       stats.rocketStacks[i++] = new ItemStack(Items.egg, 12);

       stats.rocketStacks[i++] = new ItemStack(Items.spawn_egg, 2, VersionUtil.getClassToIDMapping(EntityCow.class));
       stats.rocketStacks[i++] = new ItemStack(Items.potionitem, 4, 8262); //Night Vision Potion
       stats.rocketStacks[i++] = new ItemStack(MarsBlocks.machine, 1, 4); //Cryogenic Chamber
       stats.rocketStacks[i++] = new ItemStack(MarsItems.spaceship, 1, IRocketType.EnumRocketType.INVENTORY36.ordinal());
     //stats.rocketStacks[15] = new ItemStack(GCBlocks.brightLamp, 4);
     //stats.rocketStacks[16] = new ItemStack(GCBlocks.aluminumWire, 32);
}
项目:CrystalMod    文件:WorksiteAnimalFarm.java   
private boolean tryMilking(List<Integer> targets) {
    if (targets.isEmpty()) {
        return false;
    }
    EntityCow cow = (EntityCow) getWorld().getEntityByID(targets.remove(0));
    if (cow == null) {
        return false;
    }

    return true;
}
项目:ToroQuest    文件:EventHandlers.java   
@SubscribeEvent
public void spawnToroWhenCowPackSpawns(EntityJoinWorldEvent event) {
    if (event.getWorld().isRemote) {
        return;
    }

    Entity entity = event.getEntity();
    if (entity == null || !(entity instanceof EntityCow)) {
        return;
    }

    if (entity.getEntityData().getBoolean("AddedToWorld")) {
        return;
    }

    entity.getEntityData().setBoolean("AddedToWorld", true);

    World world = event.getWorld();

    if (world.rand.nextInt(8) != 0) {
        return;
    }

    BlockPos spawnPoint = findSurface(world, entity.getPosition());

    if (spawnPoint == null) {
        return;
    }


    Entity toro = new EntityToro(world);

    toro.setPosition(spawnPoint.getX(), spawnPoint.getY() + 1, spawnPoint.getZ());
    world.spawnEntity(toro);
}
项目:ToroQuest    文件:EventHandlers.java   
@SubscribeEvent
public void toroDontLikeYouHurtingCows(LivingHurtEvent event) {
    EntityLivingBase victim = event.getEntityLiving();
    EntityLivingBase attacker = getAttacker(event);

    if (victim == null || attacker == null || !(victim instanceof EntityCow)) {
        return;
    }

    List<EntityToro> nearbyToros = victim.getEntityWorld().getEntitiesWithinAABB(EntityToro.class,
            victim.getEntityBoundingBox().expand(40.0D, 10.0D, 40.0D));
    for (EntityToro toro : nearbyToros) {
        toro.setAttackTarget(attacker);
    }
}
项目:ToroQuest    文件:CivilizationHandlers.java   
private boolean isAnimal(EntityLivingBase victim) {
    return victim instanceof EntityCow ||
            victim instanceof EntityHorse ||
            victim instanceof EntityPig ||
            victim instanceof EntityDonkey ||
            victim instanceof EntityChicken ||
            victim instanceof EntitySheep;
}
项目:FairyFactions    文件:Spawner.java   
public Spawner() {
    biomeList = new ArrayList();

    try {
        Field afield[] = (BiomeGenBase.class).getDeclaredFields();
        LinkedList linkedlist = new LinkedList();

        for (int j = 0; j < afield.length; j++) {
            Class class1 = afield[j].getType();

            if ((afield[j].getModifiers() & 8) != 0 && class1.isAssignableFrom(BiomeGenBase.class)) {
                BiomeGenBase biomegenbase = (BiomeGenBase) afield[j].get(null);
                biomeList.add(biomegenbase.biomeName);

                if (!(biomegenbase instanceof BiomeGenHell) && !(biomegenbase instanceof BiomeGenEnd)) {
                    linkedlist.add(biomegenbase);
                }
            }
        }

        standardBiomes = (BiomeGenBase[]) linkedlist.toArray(new BiomeGenBase[0]);
        customCreatureSpawnList = new List[biomeList.size()];
        customMobSpawnList = new List[biomeList.size()];
        customAquaticSpawnList = new List[biomeList.size()];
        entityClasses = new List[3];
        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);
        clearLists();
    } catch (IllegalAccessException exception) {
        throw new RuntimeException(exception);
    }
}