Java 类net.minecraft.entity.monster.EntitySkeleton 实例源码

项目:Backmemed    文件:EntityAISkeletonRiders.java   
/**
 * Updates the task
 */
public void updateTask()
{
    DifficultyInstance difficultyinstance = this.horse.world.getDifficultyForLocation(new BlockPos(this.horse));
    this.horse.func_190691_p(false);
    this.horse.setHorseTamed(true);
    this.horse.setGrowingAge(0);
    this.horse.world.addWeatherEffect(new EntityLightningBolt(this.horse.world, this.horse.posX, this.horse.posY, this.horse.posZ, true));
    EntitySkeleton entityskeleton = this.createSkeleton(difficultyinstance, this.horse);
    entityskeleton.startRiding(this.horse);

    for (int i = 0; i < 3; ++i)
    {
        AbstractHorse abstracthorse = this.createHorse(difficultyinstance);
        EntitySkeleton entityskeleton1 = this.createSkeleton(difficultyinstance, abstracthorse);
        entityskeleton1.startRiding(abstracthorse);
        abstracthorse.addVelocity(this.horse.getRNG().nextGaussian() * 0.5D, 0.0D, this.horse.getRNG().nextGaussian() * 0.5D);
    }
}
项目:Backmemed    文件:EntityAISkeletonRiders.java   
private EntitySkeleton createSkeleton(DifficultyInstance p_188514_1_, AbstractHorse p_188514_2_)
{
    EntitySkeleton entityskeleton = new EntitySkeleton(p_188514_2_.world);
    entityskeleton.onInitialSpawn(p_188514_1_, (IEntityLivingData)null);
    entityskeleton.setPosition(p_188514_2_.posX, p_188514_2_.posY, p_188514_2_.posZ);
    entityskeleton.hurtResistantTime = 60;
    entityskeleton.enablePersistence();

    if (entityskeleton.getItemStackFromSlot(EntityEquipmentSlot.HEAD).func_190926_b())
    {
        entityskeleton.setItemStackToSlot(EntityEquipmentSlot.HEAD, new ItemStack(Items.IRON_HELMET));
    }

    entityskeleton.setItemStackToSlot(EntityEquipmentSlot.MAINHAND, EnchantmentHelper.addRandomEnchantment(entityskeleton.getRNG(), entityskeleton.getHeldItemMainhand(), (int)(5.0F + p_188514_1_.getClampedAdditionalDifficulty() * (float)entityskeleton.getRNG().nextInt(18)), false));
    entityskeleton.setItemStackToSlot(EntityEquipmentSlot.HEAD, EnchantmentHelper.addRandomEnchantment(entityskeleton.getRNG(), entityskeleton.getItemStackFromSlot(EntityEquipmentSlot.HEAD), (int)(5.0F + p_188514_1_.getClampedAdditionalDifficulty() * (float)entityskeleton.getRNG().nextInt(18)), false));
    entityskeleton.world.spawnEntityInWorld(entityskeleton);
    return entityskeleton;
}
项目:CustomWorldGen    文件:EntityAISkeletonRiders.java   
/**
 * Updates the task
 */
public void updateTask()
{
    DifficultyInstance difficultyinstance = this.horse.worldObj.getDifficultyForLocation(new BlockPos(this.horse));
    this.horse.setSkeletonTrap(false);
    this.horse.setType(HorseType.SKELETON);
    this.horse.setHorseTamed(true);
    this.horse.setGrowingAge(0);
    this.horse.worldObj.addWeatherEffect(new EntityLightningBolt(this.horse.worldObj, this.horse.posX, this.horse.posY, this.horse.posZ, true));
    EntitySkeleton entityskeleton = this.createSkeleton(difficultyinstance, this.horse);
    entityskeleton.startRiding(this.horse);

    for (int i = 0; i < 3; ++i)
    {
        EntityHorse entityhorse = this.createHorse(difficultyinstance);
        EntitySkeleton entityskeleton1 = this.createSkeleton(difficultyinstance, entityhorse);
        entityskeleton1.startRiding(entityhorse);
        entityhorse.addVelocity(this.horse.getRNG().nextGaussian() * 0.5D, 0.0D, this.horse.getRNG().nextGaussian() * 0.5D);
    }
}
项目:CustomWorldGen    文件:EntityAISkeletonRiders.java   
private EntitySkeleton createSkeleton(DifficultyInstance p_188514_1_, EntityHorse p_188514_2_)
{
    EntitySkeleton entityskeleton = new EntitySkeleton(p_188514_2_.worldObj);
    entityskeleton.onInitialSpawn(p_188514_1_, (IEntityLivingData)null);
    entityskeleton.setPosition(p_188514_2_.posX, p_188514_2_.posY, p_188514_2_.posZ);
    entityskeleton.hurtResistantTime = 60;
    entityskeleton.enablePersistence();

    if (entityskeleton.getItemStackFromSlot(EntityEquipmentSlot.HEAD) == null)
    {
        entityskeleton.setItemStackToSlot(EntityEquipmentSlot.HEAD, new ItemStack(Items.IRON_HELMET));
    }

    EnchantmentHelper.addRandomEnchantment(entityskeleton.getRNG(), entityskeleton.getHeldItemMainhand(), (int)(5.0F + p_188514_1_.getClampedAdditionalDifficulty() * (float)entityskeleton.getRNG().nextInt(18)), false);
    EnchantmentHelper.addRandomEnchantment(entityskeleton.getRNG(), entityskeleton.getItemStackFromSlot(EntityEquipmentSlot.HEAD), (int)(5.0F + p_188514_1_.getClampedAdditionalDifficulty() * (float)entityskeleton.getRNG().nextInt(18)), false);
    entityskeleton.worldObj.spawnEntityInWorld(entityskeleton);
    return entityskeleton;
}
项目:CustomWorldGen    文件:EntityWolf.java   
protected void initEntityAI()
{
    this.aiSit = new EntityAISit(this);
    this.tasks.addTask(1, new EntityAISwimming(this));
    this.tasks.addTask(2, this.aiSit);
    this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F));
    this.tasks.addTask(4, new EntityAIAttackMelee(this, 1.0D, true));
    this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
    this.tasks.addTask(6, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(7, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(8, new EntityAIBeg(this, 8.0F));
    this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
    this.tasks.addTask(9, new EntityAILookIdle(this));
    this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this));
    this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this));
    this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true, new Class[0]));
    this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntityAnimal.class, false, new Predicate<Entity>()
    {
        public boolean apply(@Nullable Entity p_apply_1_)
        {
            return p_apply_1_ instanceof EntitySheep || p_apply_1_ instanceof EntityRabbit;
        }
    }));
    this.targetTasks.addTask(5, new EntityAINearestAttackableTarget(this, EntitySkeleton.class, false));
}
项目:CustomWorldGen    文件:ModelSkeleton.java   
/**
 * Used for easily adding entity-dependent animations. The second and third float params here are the same second
 * and third as in the setRotationAngles method.
 */
public void setLivingAnimations(EntityLivingBase entitylivingbaseIn, float p_78086_2_, float p_78086_3_, float partialTickTime)
{
    this.rightArmPose = ModelBiped.ArmPose.EMPTY;
    this.leftArmPose = ModelBiped.ArmPose.EMPTY;
    ItemStack itemstack = entitylivingbaseIn.getHeldItem(EnumHand.MAIN_HAND);

    if (itemstack != null && itemstack.getItem() == Items.BOW && ((EntitySkeleton)entitylivingbaseIn).isSwingingArms())
    {
        if (entitylivingbaseIn.getPrimaryHand() == EnumHandSide.RIGHT)
        {
            this.rightArmPose = ModelBiped.ArmPose.BOW_AND_ARROW;
        }
        else
        {
            this.leftArmPose = ModelBiped.ArmPose.BOW_AND_ARROW;
        }
    }

    super.setLivingAnimations(entitylivingbaseIn, p_78086_2_, p_78086_3_, partialTickTime);
}
项目:CustomWorldGen    文件:ModelSkeleton.java   
/**
 * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
 * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
 * "far" arms and legs can swing at most.
 */
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)
{
    super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entityIn);
    ItemStack itemstack = ((EntityLivingBase)entityIn).getHeldItemMainhand();
    EntitySkeleton entityskeleton = (EntitySkeleton)entityIn;

    if (entityskeleton.isSwingingArms() && (itemstack == null || itemstack.getItem() != Items.BOW))
    {
        float f = MathHelper.sin(this.swingProgress * (float)Math.PI);
        float f1 = MathHelper.sin((1.0F - (1.0F - this.swingProgress) * (1.0F - this.swingProgress)) * (float)Math.PI);
        this.bipedRightArm.rotateAngleZ = 0.0F;
        this.bipedLeftArm.rotateAngleZ = 0.0F;
        this.bipedRightArm.rotateAngleY = -(0.1F - f * 0.6F);
        this.bipedLeftArm.rotateAngleY = 0.1F - f * 0.6F;
        this.bipedRightArm.rotateAngleX = -((float)Math.PI / 2F);
        this.bipedLeftArm.rotateAngleX = -((float)Math.PI / 2F);
        this.bipedRightArm.rotateAngleX -= f * 1.2F - f1 * 0.4F;
        this.bipedLeftArm.rotateAngleX -= f * 1.2F - f1 * 0.4F;
        this.bipedRightArm.rotateAngleZ += MathHelper.cos(ageInTicks * 0.09F) * 0.05F + 0.05F;
        this.bipedLeftArm.rotateAngleZ -= MathHelper.cos(ageInTicks * 0.09F) * 0.05F + 0.05F;
        this.bipedRightArm.rotateAngleX += MathHelper.sin(ageInTicks * 0.067F) * 0.05F;
        this.bipedLeftArm.rotateAngleX -= MathHelper.sin(ageInTicks * 0.067F) * 0.05F;
    }
}
项目:LittleThings-old    文件:DustMobDrop.java   
@SubscribeEvent
public void onMobDrops(LivingDropsEvent e)
{
    World world = e.getEntity().getEntityWorld();
    Random rng = world.rand;
    if (e.getEntity() instanceof EntitySkeleton) {
        EntitySkeleton skele = (EntitySkeleton) e.getEntity();
        if (skele.getSkeletonType() == 1) {
            if (rng.nextFloat() < 0.20 + (e.getLootingLevel() + 1 * 0.05))
                e.getDrops().add(new EntityItem(world, skele.posX, skele.posY, skele.posZ, new ItemStack(ModItems.MobDust, 1, 0)));
        }
    }

    if (e.getEntity() instanceof EntityCaveSpider) {
        if (rng.nextFloat() < 0.20 + (e.getLootingLevel() + 1 * 0.05))
            e.getDrops().add(new EntityItem(world, e.getEntity().posX, e.getEntity().posY, e.getEntity().posZ, new ItemStack(ModItems.MobDust, 1, 1)));
    }
}
项目:Overlord    文件:EntityMilkBottle.java   
@Override
protected void onImpact(@Nonnull RayTraceResult mop) {
    if (!this.world.isRemote) {
        AxisAlignedBB axisalignedbb = this.getEntityBoundingBox().grow(4.0D, 2.0D, 4.0D);
        List<EntityLivingBase> list = this.world.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb);

        if (!list.isEmpty()) {
            for (EntityLivingBase entitylivingbase : list) {
                if (entitylivingbase instanceof EntitySkeletonWarrior || entitylivingbase instanceof EntityBabySkeleton || entitylivingbase instanceof EntitySkeleton || entitylivingbase instanceof EntitySkeletonHorse) {
                    double d0 = this.getDistanceSqToEntity(entitylivingbase);

                    if (d0 < 16.0D)
                        entitylivingbase.heal(1);
                }
            }
        }
        world.playSound(null, posX, posY, posZ, SoundEvents.BLOCK_GLASS_BREAK, SoundCategory.NEUTRAL, 0.5F, 0.8F / (rand.nextFloat() * 0.4F + 0.8F));
        this.setDead();
    }
}
项目:MidgarCrusade    文件:APIGen.java   
public static EntitySkeleton getRandomSkeletonClasse(World w, double x, double y, double z, Random r)
{
  EntitySkeleton skeleton = new EntitySkeleton(w);
  skeleton.setLocationAndAngles(x, y + 1.0D, z, 0.0F, 0.0F);
  skeleton.setSkeletonType(1);

  int alea = r.nextInt(4);

  if (alea == 0)
  {
  }
  else if (alea == 1)
  {}
  else
  {}

  return skeleton;
}
项目:MineLittlePony    文件:MineLittlePony.java   
private void saveCurrentRenderers(RenderManager rm) {
    // villagers
    saveRenderer(rm, EntityVillager.class);
    saveRenderer(rm, EntityZombieVillager.class);
    // zombies
    saveRenderer(rm, EntityZombie.class);
    saveRenderer(rm, EntityHusk.class);
    // pig zombie
    saveRenderer(rm, EntityPigZombie.class);
    // skeletons
    saveRenderer(rm, EntitySkeleton.class);
    saveRenderer(rm, EntityStray.class);
    saveRenderer(rm, EntityWitherSkeleton.class);
    // illagers
    saveRenderer(rm, EntityVex.class);
    saveRenderer(rm, EntityEvoker.class);
    saveRenderer(rm, EntityVindicator.class);
    saveRenderer(rm, EntityIllusionIllager.class);
}
项目:Mob-Amputation    文件:EventHandlerClient.java   
@SubscribeEvent
public void onEntitySpawn(EntityJoinWorldEvent event)
{
    if(event.getEntity().world.isRemote)
    {
        Minecraft mc = Minecraft.getMinecraft();
        if(event.getEntity() instanceof EntityFishHook)
        {
            fishHooks.add((EntityFishHook)event.getEntity());
        }
        if(event.getEntity() instanceof EntityZombie && !(event.getEntity() instanceof EntityZombieVillager) || event.getEntity() instanceof EntitySkeleton || MobAmputation.config.playerGibs == 1 && event.getEntity() instanceof EntityPlayer && event.getEntity() != mc.player)
        {
            EntityLivingBase living = (EntityLivingBase)event.getEntity();
            if(!amputationMap.containsKey(living) && !living.isChild())
            {
                attachGibs(event.getEntity().world, living);
            }
        }
    }
}
项目:RandomToolKit    文件:EntitySkeletonPriest.java   
@Nullable
@Override
public IEntityLivingData onInitialSpawn(DifficultyInstance difficulty, @Nullable IEntityLivingData livingdata) {

    if(!worldObj.isRemote){
        for(int i = 0; i < 4; i++){
            EntitySkeleton mob = new EntitySkeleton(worldObj);
            mob.setSkeletonType(SkeletonType.WITHER);
            mob.setItemStackToSlot(EntityEquipmentSlot.MAINHAND, new ItemStack(Items.DIAMOND_SWORD));
            mob.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(4.0D);

            BlockPos pos = pickSpawnPoint();
            mob.setLocationAndAngles(0.5 + pos.getX(), pos.getY(), 0.5 + pos.getZ(), CMath.random.nextFloat() * 360,0);

            worldObj.spawnEntityInWorld(mob);
        }
    }

    return super.onInitialSpawn(difficulty, livingdata);
}
项目:TheBatBelt    文件:ItemSkeleSword.java   
@Override
public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity)
{
    if(entity instanceof EntitySkeleton)
    {
        EntitySkeleton skele = (EntitySkeleton) entity;
        if(skele.getSkeletonType() == 1)
        {
            skele.attackEntityFrom(DamageSource.causePlayerDamage(player),2.0F);
            return false;
        }
    }

    if(entity instanceof EntityLivingBase)
    {
        entity.worldObj.newExplosion(entity,entity.posX,entity.posY,entity.posZ,3.0F,false,true);
        player.attackEntityFrom(DamageSource.magic,1000.0F);
        stack.stackSize = 0;
        return false;
    }

    return true;
}
项目:UHC-Reloaded    文件:EasierSkeleton.java   
@SubscribeEvent
public void onSkeletonUpdate(LivingEvent.LivingUpdateEvent event) {
    if (!(event.getEntityLiving() instanceof EntitySkeleton)) {
        return;
    }
    EntitySkeleton skeleton = (EntitySkeleton) event.getEntityLiving();
    EntityAITasks tasks = skeleton.tasks;
    boolean containsOld = false;
    Iterator<EntityAITasks.EntityAITaskEntry> itr = tasks.taskEntries.iterator();
    while (itr.hasNext()) {
        EntityAITasks.EntityAITaskEntry entry = itr.next();
        if (entry.action instanceof EntityAIAttackRangedBow) {
            itr.remove();
        }
        if (entry.action instanceof EntityAIAttackRanged) {
            containsOld = true;
        }
    }
    if (!containsOld) {
        tasks.addTask(4, new EntityAIAttackRanged(skeleton, 1.0D, 20, 15.0F));
    }
}
项目:Rediscovered-Mod-1.8.8    文件:EntityRana.java   
public EntityRana(World par1World, int par2)
{
    super(par1World);
    randomTickDivider = 0;
    isPlayingFlag = false;
    villageObj = null;
    setProfession(par2);
    dead = false;
    ((PathNavigateGround)this.getNavigator()).setAvoidsWater(true);
    tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIAvoidEntity(this, EntityZombie.class, 8.0F, 0.6D, 0.6D));
    this.tasks.addTask(1, new EntityAIAvoidEntity(this, EntitySkeleton.class, 8.0F, 0.6D, 0.6D));
    this.tasks.addTask(1, new EntityAIAvoidEntity(this, EntitySpider.class, 8.0F, 0.6D, 0.6D));
    this.tasks.addTask(1, new EntityAIAvoidEntity(this, EntityTNTPrimed.class, 8.0F, 0.6D, 0.6D));
    this.tasks.addTask(1, new EntityAIAvoidEntity(this, EntityCreeper.class, 8.0F, 0.6D, 0.6D));
    tasks.addTask(5, new EntityAIMoveIndoors(this));
    tasks.addTask(6, new EntityAIRestrictOpenDoor(this));
    tasks.addTask(7, new EntityAIOpenDoor(this, true));
    tasks.addTask(8, new EntityAIMoveTowardsRestriction(this, 0.3F));
    tasks.addTask(9, new EntityAIWatchClosest2(this, net.minecraft.entity.player.EntityPlayer.class, 3F, 1.0F));
    tasks.addTask(10, new EntityAIWatchClosest2(this, net.minecraft.entity.passive.EntityVillager.class, 5F, 0.02F));
    tasks.addTask(11, new EntityAIWatchClosest2(this, com.stormister.rediscovered.EntityRana.class, 5F, 0.02F));
    tasks.addTask(12, new EntityAIWatchClosest2(this, com.stormister.rediscovered.EntitySteve.class, 5F, 0.02F));
    tasks.addTask(13, new EntityAIWander(this, 0.3F));
    tasks.addTask(14, new EntityAIWatchClosest(this, net.minecraft.entity.EntityLiving.class, 8F));
}
项目:RidiculousWorld    文件:BiomeGenMadness.java   
public BiomeGenMadness(int id)
{
    super(id);
    this.spawnableCreatureList.clear();
    this.theBiomeDecorator.treesPerChunk = -1;
    this.theBiomeDecorator.grassPerChunk = -1;
    this.theBiomeDecorator.mushroomsPerChunk = -1;
    this.topBlock = Blocks.packed_ice;
    this.fillerBlock = Blocks.packed_ice;
    this.spawnableCreatureList.clear();
    this.spawnableMonsterList.clear();
    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 SpawnListEntry(EntityShoggoth.class, 90, 4, 4));
    this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityEnderman.class, 30, 1, 4));
    BiomeManager.addBiome(BiomeManager.BiomeType.ICY, new BiomeManager.BiomeEntry(this, Config.madnessWeight));
    BiomeManager.addBiome(BiomeManager.BiomeType.COOL, new BiomeManager.BiomeEntry(this, Config.madnessWeight));
    BiomeManager.addStrongholdBiome(this);
    BiomeDictionary.registerBiomeType(this, BiomeDictionary.Type.COLD, BiomeDictionary.Type.DEAD, BiomeDictionary.Type.MOUNTAIN, BiomeDictionary.Type.SNOWY);
    setBiomeName("Mountain of Madness");
    setTemperatureRainfall(0.05F, 0.5F);
    this.setHeight(BiomeGenBase.height_HighPlateaus);
    this.setColor(0x0E875B);
    this.waterColorMultiplier = 0x004A07;
}
项目:GalacticraftPixelGalaxy    文件:ChunkProviderGreenPixel.java   
@SuppressWarnings({"unchecked","rawtypes"}) 
@Override public List getPossibleCreatures(EnumCreatureType par1EnumCreatureType,int i,int j,int k){
      if (par1EnumCreatureType == EnumCreatureType.monster) 
    {
        List monsters=new ArrayList();
        monsters.add(new BiomeGenBase.SpawnListEntry(EntityZombie.class, 8, 2, 3));
        monsters.add(new BiomeGenBase.SpawnListEntry(EntitySpider.class, 8, 2, 3));
        monsters.add(new BiomeGenBase.SpawnListEntry(EntitySkeleton.class, 8, 2, 3));
        monsters.add(new BiomeGenBase.SpawnListEntry(EntityCreeper.class, 8, 2, 3));
        monsters.add(new BiomeGenBase.SpawnListEntry(EntityEnderman.class, 8, 1, 3));
        monsters.add(new BiomeGenBase.SpawnListEntry(EntityPixelOneSwingman.class, 1, 1, 1));
        return monsters;
    }
    if (par1EnumCreatureType == EnumCreatureType.creature) 
    {
        List creatures=new ArrayList();
        creatures.add(new BiomeGenBase.SpawnListEntry(EntityhumanPixel.class, 8, 2, 3));
        creatures.add(new BiomeGenBase.SpawnListEntry(EntitypixelPig.class, 8, 1, 3));
        creatures.add(new BiomeGenBase.SpawnListEntry(EntitypixelCow.class, 8, 1, 3));
        return creatures;
        }
      return null;
    }
项目:vintagecraft    文件:VintageCraftMobTweaker.java   
public static void entitySpawn(LivingSpawnEvent evt) {
    if (! (evt.entity.worldObj instanceof WorldServer)) return;

    if (evt.entity instanceof EntityMob) {
        int spawncap = VintageCraftMobTweaker.spawnCapByDay(evt.world.getTotalWorldTime() / 24000L, evt.world.getDifficulty());
        if (spawncap == 0) {
            evt.setCanceled(true);
            return;
        }
    }

    if (evt.entity instanceof EntityZombie) {
        gearUpMob((EntityZombie)evt.entity);
    }

    if (evt.entity instanceof EntitySkeleton) {
        gearUpMob((EntitySkeleton)evt.entity); 
    }


}
项目:ZeroQuest    文件:BiomeGenBlueTaiga.java   
public BiomeGenBlueTaiga(int p_i45385_1_, int p_i45385_2_)
{
    super(p_i45385_1_);
    this.field_150644_aH = p_i45385_2_;
    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(EntitySlime.class, 100, 4, 4));
    this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityIceZertum.class, 20, 3, 4));
    this.theBiomeDecorator.treesPerChunk = 10;

    if (p_i45385_2_ != 1 && p_i45385_2_ != 2)
    {
        this.theBiomeDecorator.grassPerChunk = 1;
        this.theBiomeDecorator.mushroomsPerChunk = 1;
    }
    else
    {
        this.theBiomeDecorator.grassPerChunk = 7;
        this.theBiomeDecorator.deadBushPerChunk = 1;
        this.theBiomeDecorator.mushroomsPerChunk = 3;
    }
}
项目: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    文件:BiomeGenNileMountains.java   
public BiomeGenNileMountains(int p_i45373_1_, boolean p_i45373_2_)
{
    super(p_i45373_1_);
    this.theWorldGenerator = new WorldGenMinable(Blocks.monster_egg, 8);
    this.field_150634_aD = new WorldGenTaiga2(false);
    this.field_150635_aE = 0;
    this.field_150636_aF = 1;
    this.field_150637_aG = 2;
    this.field_150638_aH = this.field_150635_aE;
    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(EntitySlime.class, 100, 4, 4));

    if (p_i45373_2_)
    {
        this.theBiomeDecorator.treesPerChunk = 3;
        this.field_150638_aH = this.field_150636_aF;
    }
}
项目:Mini-Bosses    文件:EntityFeeder.java   
@Override
public void onKillEntity(EntityLivingBase entity) {
    super.onKillEntity(entity);

    if(entity instanceof EntityCreeper) {
        this.getDataWatcher().updateObject(12, Integer.valueOf(3));
    }
    if(entity instanceof EntitySkeleton) {
        this.getDataWatcher().updateObject(12, Integer.valueOf(2));
    }
    if(entity instanceof EntityZombie) {
        this.getDataWatcher().updateObject(12, Integer.valueOf(1));
    }
    if(entity instanceof IAnimals) {
        this.heal(10.0F);
    }
    this.heal(5.0F);
}
项目:ZeroQuest    文件:BiomeGenNileSavanna.java   
public BiomeGenNileSavanna(int p_i45383_1_)
{
    super(p_i45383_1_);
    this.theBiomeDecorator.treesPerChunk = 1;
    this.theBiomeDecorator.flowersPerChunk = 4;
    this.theBiomeDecorator.grassPerChunk = 20;
    this.spawnableMonsterList.clear();
    this.spawnableCreatureList.clear();
    this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityZertum.class, 100, 4, 4));
    this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityKortor.class, 100, 2, 3));
    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(EntityCreeper.class, 100, 4, 4));
    this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySkeleton.class, 100, 4, 4));
    this.waterColorMultiplier = 0x0099cc;
}
项目:ZeroQuest    文件:BiomeGenBlueTaiga.java   
public BiomeGenBlueTaiga(int p_i45385_1_, int p_i45385_2_)
{
    super(p_i45385_1_);
    this.field_150644_aH = p_i45385_2_;
    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(EntitySlime.class, 100, 4, 4));
    this.theBiomeDecorator.treesPerChunk = 10;

    if (p_i45385_2_ != 1 && p_i45385_2_ != 2)
    {
        this.theBiomeDecorator.grassPerChunk = 1;
        this.theBiomeDecorator.mushroomsPerChunk = 1;
    }
    else
    {
        this.theBiomeDecorator.grassPerChunk = 7;
        this.theBiomeDecorator.deadBushPerChunk = 1;
        this.theBiomeDecorator.mushroomsPerChunk = 3;
    }
}
项目:ZeroQuest    文件:BiomeGenDestroZone.java   
public BiomeGenDestroZone(int par1)
{
    super(par1);
    this.topBlock = Blocks.sand.getDefaultState();
    this.fillerBlock = Blocks.sand.getDefaultState();
    this.waterColorMultiplier = 0x333333;
    this.theBiomeDecorator.treesPerChunk = -999;
    this.theBiomeDecorator.deadBushPerChunk = 2;
    this.theBiomeDecorator.reedsPerChunk = 50;
    this.theBiomeDecorator.cactiPerChunk = 10;
    this.addFlower(ModBlocks.destroFlower.getDefaultState(), 90);
    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(EntitySlime.class, 100, 4, 4));

}
项目: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)); 
}
项目:ZeroQuest    文件:BiomeGenNileSwamp.java   
public BiomeGenNileSwamp(int p_i1988_1_)
{
    super(p_i1988_1_);
    this.theBiomeDecorator.treesPerChunk = 2;
    this.theBiomeDecorator.flowersPerChunk = 1;
    this.theBiomeDecorator.deadBushPerChunk = 1;
    this.theBiomeDecorator.mushroomsPerChunk = 8;
    this.theBiomeDecorator.reedsPerChunk = 10;
    this.theBiomeDecorator.clayPerChunk = 1;
    this.theBiomeDecorator.waterlilyPerChunk = 4;
    this.theBiomeDecorator.sandPerChunk2 = 0;
    this.theBiomeDecorator.sandPerChunk = 0;
    this.theBiomeDecorator.grassPerChunk = 5;
    this.waterColorMultiplier = 14745518;
    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(EntitySlime.class, 100, 4, 4));
    this.flowers.clear();
    this.addFlower(Blocks.red_flower.getDefaultState(), 10);
    this.addFlower(ModBlocks.nilePinkFlower.getDefaultState(), 20);
}
项目:ExpandedRailsMod    文件:EntityAISkeletonRiders.java   
/**
 * Updates the task
 */
public void updateTask()
{
    DifficultyInstance difficultyinstance = this.horse.worldObj.getDifficultyForLocation(new BlockPos(this.horse));
    this.horse.setSkeletonTrap(false);
    this.horse.setType(HorseType.SKELETON);
    this.horse.setHorseTamed(true);
    this.horse.setGrowingAge(0);
    this.horse.worldObj.addWeatherEffect(new EntityLightningBolt(this.horse.worldObj, this.horse.posX, this.horse.posY, this.horse.posZ, true));
    EntitySkeleton entityskeleton = this.createSkeleton(difficultyinstance, this.horse);
    entityskeleton.startRiding(this.horse);

    for (int i = 0; i < 3; ++i)
    {
        EntityHorse entityhorse = this.createHorse(difficultyinstance);
        EntitySkeleton entityskeleton1 = this.createSkeleton(difficultyinstance, entityhorse);
        entityskeleton1.startRiding(entityhorse);
        entityhorse.addVelocity(this.horse.getRNG().nextGaussian() * 0.5D, 0.0D, this.horse.getRNG().nextGaussian() * 0.5D);
    }
}
项目:ExpandedRailsMod    文件:EntityAISkeletonRiders.java   
private EntitySkeleton createSkeleton(DifficultyInstance p_188514_1_, EntityHorse p_188514_2_)
{
    EntitySkeleton entityskeleton = new EntitySkeleton(p_188514_2_.worldObj);
    entityskeleton.onInitialSpawn(p_188514_1_, (IEntityLivingData)null);
    entityskeleton.setPosition(p_188514_2_.posX, p_188514_2_.posY, p_188514_2_.posZ);
    entityskeleton.hurtResistantTime = 60;
    entityskeleton.enablePersistence();

    if (entityskeleton.getItemStackFromSlot(EntityEquipmentSlot.HEAD) == null)
    {
        entityskeleton.setItemStackToSlot(EntityEquipmentSlot.HEAD, new ItemStack(Items.IRON_HELMET));
    }

    EnchantmentHelper.addRandomEnchantment(entityskeleton.getRNG(), entityskeleton.getHeldItemMainhand(), (int)(5.0F + p_188514_1_.getClampedAdditionalDifficulty() * (float)entityskeleton.getRNG().nextInt(18)), false);
    EnchantmentHelper.addRandomEnchantment(entityskeleton.getRNG(), entityskeleton.getItemStackFromSlot(EntityEquipmentSlot.HEAD), (int)(5.0F + p_188514_1_.getClampedAdditionalDifficulty() * (float)entityskeleton.getRNG().nextInt(18)), false);
    entityskeleton.worldObj.spawnEntityInWorld(entityskeleton);
    return entityskeleton;
}
项目:ExpandedRailsMod    文件:EntityWolf.java   
protected void initEntityAI()
{
    this.aiSit = new EntityAISit(this);
    this.tasks.addTask(1, new EntityAISwimming(this));
    this.tasks.addTask(2, this.aiSit);
    this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F));
    this.tasks.addTask(4, new EntityAIAttackMelee(this, 1.0D, true));
    this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
    this.tasks.addTask(6, new EntityAIMate(this, 1.0D));
    this.tasks.addTask(7, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(8, new EntityAIBeg(this, 8.0F));
    this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
    this.tasks.addTask(9, new EntityAILookIdle(this));
    this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this));
    this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this));
    this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true, new Class[0]));
    this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntityAnimal.class, false, new Predicate<Entity>()
    {
        public boolean apply(@Nullable Entity p_apply_1_)
        {
            return p_apply_1_ instanceof EntitySheep || p_apply_1_ instanceof EntityRabbit;
        }
    }));
    this.targetTasks.addTask(5, new EntityAINearestAttackableTarget(this, EntitySkeleton.class, false));
}
项目:ExpandedRailsMod    文件:ModelSkeleton.java   
/**
 * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
 * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
 * "far" arms and legs can swing at most.
 */
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)
{
    super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entityIn);
    ItemStack itemstack = ((EntityLivingBase)entityIn).getHeldItemMainhand();
    EntitySkeleton entityskeleton = (EntitySkeleton)entityIn;

    if (entityskeleton.isSwingingArms() && (itemstack == null || itemstack.getItem() != Items.BOW))
    {
        float f = MathHelper.sin(this.swingProgress * (float)Math.PI);
        float f1 = MathHelper.sin((1.0F - (1.0F - this.swingProgress) * (1.0F - this.swingProgress)) * (float)Math.PI);
        this.bipedRightArm.rotateAngleZ = 0.0F;
        this.bipedLeftArm.rotateAngleZ = 0.0F;
        this.bipedRightArm.rotateAngleY = -(0.1F - f * 0.6F);
        this.bipedLeftArm.rotateAngleY = 0.1F - f * 0.6F;
        this.bipedRightArm.rotateAngleX = -((float)Math.PI / 2F);
        this.bipedLeftArm.rotateAngleX = -((float)Math.PI / 2F);
        this.bipedRightArm.rotateAngleX -= f * 1.2F - f1 * 0.4F;
        this.bipedLeftArm.rotateAngleX -= f * 1.2F - f1 * 0.4F;
        this.bipedRightArm.rotateAngleZ += MathHelper.cos(ageInTicks * 0.09F) * 0.05F + 0.05F;
        this.bipedLeftArm.rotateAngleZ -= MathHelper.cos(ageInTicks * 0.09F) * 0.05F + 0.05F;
        this.bipedRightArm.rotateAngleX += MathHelper.sin(ageInTicks * 0.067F) * 0.05F;
        this.bipedLeftArm.rotateAngleX -= MathHelper.sin(ageInTicks * 0.067F) * 0.05F;
    }
}
项目:AbyssalCraft    文件:EntitySkeletonGoliath.java   
public EntitySkeletonGoliath(World par1World) {
    super(par1World);
    setSize(1.0F, 4.5F);
    tasks.addTask(2, new EntityAIAttackMelee(this, 1.0D, true));
    tasks.addTask(3, new EntityAIMoveTowardsRestriction(this, 1.0D));
    tasks.addTask(4, new EntityAIWander(this, 1.0D));
    tasks.addTask(5, new EntityAIFleeSun(this, 1.0D));
    tasks.addTask(7, new EntityAILookIdle(this));
    tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
    tasks.addTask(7, new EntityAIWatchClosest(this, EntityAbyssalZombie.class, 8.0F));
    tasks.addTask(7, new EntityAIWatchClosest(this, EntityZombie.class, 8.0F));
    tasks.addTask(7, new EntityAIWatchClosest(this, EntityDepthsGhoul.class, 8.0F));
    tasks.addTask(7, new EntityAIWatchClosest(this, EntitySkeleton.class, 8.0F));
    tasks.addTask(7, new EntityAIWatchClosest(this, EntitySkeletonGoliath.class, 8.0F));
    targetTasks.addTask(1, new EntityAIHurtByTarget(this, false));
    targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true));
}
项目:AbyssalCraft    文件:EntityDepthsGhoul.java   
public EntityDepthsGhoul(World par1World) {
    super(par1World);
    tasks.addTask(0, new EntityAISwimming(this));
    tasks.addTask(2, new EntityAIAttackMelee(this, 1.0D, false));
    tasks.addTask(3, new EntityAIFleeSun(this, 1.0D));
    tasks.addTask(4, new EntityAIMoveTowardsRestriction(this, 1.0D));
    tasks.addTask(5, new EntityAIWander(this, 1.0D));
    tasks.addTask(7, new EntityAILookIdle(this));
    tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
    tasks.addTask(7, new EntityAIWatchClosest(this, EntityDepthsGhoul.class, 8.0F));
    tasks.addTask(7, new EntityAIWatchClosest(this, EntityAbyssalZombie.class, 8.0F));
    tasks.addTask(7, new EntityAIWatchClosest(this, EntityZombie.class, 8.0F));
    tasks.addTask(7, new EntityAIWatchClosest(this, EntitySkeleton.class, 8.0F));
    tasks.addTask(7, new EntityAIWatchClosest(this, EntitySkeletonGoliath.class, 8.0F));
    targetTasks.addTask(1, new EntityAIHurtByTarget(this, false));
    targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true));
    setSize(1.0F, 3.0F);
}
项目:AbyssalCraft    文件:EntityAbyssalZombie.java   
public EntityAbyssalZombie(World par1World) {
    super(par1World);
    tasks.addTask(0, new EntityAISwimming(this));
    tasks.addTask(2, new EntityAIAttackMelee(this, 1.0D, true));
    tasks.addTask(4, new EntityAIFleeSun(this, 1.0D));
    tasks.addTask(5, new EntityAIMoveTowardsRestriction(this, 1.0D));
    tasks.addTask(6, new EntityAIWander(this, 1.0D));
    tasks.addTask(8, new EntityAILookIdle(this));
    tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
    tasks.addTask(8, new EntityAIWatchClosest(this, EntityAbyssalZombie.class, 8.0F));
    tasks.addTask(8, new EntityAIWatchClosest(this, EntityZombie.class, 8.0F));
    tasks.addTask(8, new EntityAIWatchClosest(this, EntityDepthsGhoul.class, 8.0F));
    tasks.addTask(8, new EntityAIWatchClosest(this, EntitySkeleton.class, 8.0F));
    tasks.addTask(8, new EntityAIWatchClosest(this, EntitySkeletonGoliath.class, 8.0F));
    targetTasks.addTask(1, new EntityAIHurtByTarget(this, false));
    targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityZombie.class, true));
    targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true));
    setSize(0.6F, 1.8F);
}
项目:Marble    文件:WitheringHandler.java   
@SubscribeEvent
public void onEntityKill(LivingDropsEvent event){
    if(event.entityLiving instanceof EntitySkeleton){
        if(((EntitySkeleton) event.entityLiving).getSkeletonType() == 1){
            if(Math.round(Marble.rand.nextFloat() * 100) < ConfigHandler.witherOneDropChance){
                MiscHelper.drop(event, Items.enchanted_book.getEnchantedItemStack(new EnchantmentData(ConfigHandler.witheringID, 1)));
            }
        }
    }

    if(event.entityLiving instanceof EntityWither){
        if(Math.round(Marble.rand.nextInt()) < ConfigHandler.witherTwoDropChance){
            MiscHelper.drop(event, Items.enchanted_book.getEnchantedItemStack(new EnchantmentData(ConfigHandler.witheringID, 2)));
        }
    }
}
项目:NausicaaMod    文件:JungleJelly.java   
@Override
public IEntityLivingData onSpawnWithEgg(IEntityLivingData par1EntityLivingData)
   {
       Object par1EntityLivingData1 = super.onSpawnWithEgg(par1EntityLivingData);

       if (this.worldObj.rand.nextInt(100) == 0)
       {
           EntitySkeleton entityskeleton = new EntitySkeleton(this.worldObj);
           entityskeleton.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, 0.0F);
           entityskeleton.onSpawnWithEgg((IEntityLivingData)null);
           this.worldObj.spawnEntityInWorld(entityskeleton);
           entityskeleton.mountEntity(this);
       }



       return (IEntityLivingData)par1EntityLivingData1;
   }
项目:Quantum-Anomalies    文件:EntityListener.java   
@SubscribeEvent
public void sp00ky(EntityJoinWorldEvent event) {
    if (event.entity instanceof EntitySkeleton && RandomUtils.rnd.nextInt(10) == 0) {
        boolean halloween = false;

        Calendar cal = Calendar.getInstance();
        int day = cal.get(Calendar.DAY_OF_MONTH);
        int mon = cal.get(Calendar.MONTH);

        halloween = (day == 31 && mon == Calendar.OCTOBER);

        if (!halloween) return;

        ((EntitySkeleton) event.entity).setCustomNameTag("SPOOKY SCARY SKELETONS");
        event.entity.setCurrentItemOrArmor(4, new ItemStack(Blocks.lit_pumpkin));
    }
}