Package net.minecraft.entity.monster

Examples of net.minecraft.entity.monster.EntitySlime


   
    EntityTNTPrimed armedTNT = (EntityTNTPrimed)MFRUtil.prepareMob(EntityTNTPrimed.class, world);
    armedTNT.fuse = 120;
    mobs.add(new RandomMob(armedTNT, 5));
   
    EntitySlime invisislime = (EntitySlime)MFRUtil.prepareMob(EntitySlime.class, world);
    invisislime.addPotionEffect(new PotionEffect(Potion.invisibility.id, 120 * 20));
    mobs.add(new RandomMob(invisislime, 5));
   
    EntityMooshroom invisishroom = (EntityMooshroom)MFRUtil.prepareMob(EntityMooshroom.class, world);
    invisishroom.addPotionEffect(new PotionEffect(Potion.invisibility.id, 120 * 20));
    mobs.add(new RandomMob(invisishroom, 5));
View Full Code Here


  }
 
  @Override
  public boolean inject(World world, EntityLiving entity, ItemStack syringe)
  {
    EntitySlime slime = (EntitySlime)entity;
    slime.setSlimeSize(slime.getSlimeSize() << 1);
    return true;
  }
View Full Code Here

                        return;
                    }
                } else if (excludedEntities.contains(entity.getClass())) {
                    return;
                } else if (entity instanceof EntitySlime) {
                    EntitySlime slime = (EntitySlime) entity;
                    if (slime.getSlimeSize() >= 100)
                        return;
                }

                if (entity.ridingEntity == null) {
                    EffectManager.instance.teleportEffect(entity, cart.posX, cart.posY, cart.posZ);
View Full Code Here

            count++;
        if(tags.getInteger("Extra") == slimeMat)
            count++;

        if(random.nextInt(chance) < count) {
            EntitySlime entity = new EntitySlime(world);
            entity.setPosition(x+0.5,y,z+0.5);
            entity.setSlimeSize(1); // minislime!
            world.spawnEntityInWorld(entity);
            entity.playLivingSound();
        }

        // blueslime
        slimeMat = TinkerTools.MaterialID.BlueSlime;
        count = 0;
        if(tags.getInteger("Head") == slimeMat)
            count++;
        if(tags.getInteger("Handle") == slimeMat)
            count++;
        if(tags.getInteger("Accessory") == slimeMat)
            count++;
        if(tags.getInteger("Extra") == slimeMat)
            count++;

        if(random.nextInt(chance) < count) {
            BlueSlime entity = new BlueSlime(world);
            entity.setPosition(x+0.5,y,z+0.5);
            entity.setSlimeSize(1); // minislime!
            world.spawnEntityInWorld(entity);
            entity.playLivingSound();
        }
    }
View Full Code Here

    @Override
    public void executeFullGrownEffect(World world, int x, int y, int z, Random rand){
        if(world.getBlockMetadata(x, y, z) == 14) {
            int nearbyEntityCount = world.getEntitiesWithinAABB(EntitySlime.class, AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1).expand(SPAWN_RANGE * 2, 4.0D, SPAWN_RANGE * 2)).size();
            if(nearbyEntityCount < MAX_NEARBY_ENTITIES) {
                EntitySlime SS = new EntitySlime(world);
                double randXmotion = rand.nextDouble() - 0.5D;
                double randYmotion = 1D;// rand.nextDouble();
                double randZmotion = rand.nextDouble() - 0.5D;
                SS.setLocationAndAngles(x + 0.5D, y + 0.5D, z + 0.5D, rand.nextFloat() * 360.0F, 0.0F);
                SS.motionX = randXmotion;
                SS.motionY = randYmotion;
                SS.motionZ = randZmotion;
                world.spawnEntityInWorld(SS);
                SS.spawnExplosionParticle();
                SS.playSound("mob.newsound.chickenplop", 0.2F, ((rand.nextFloat() - rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);
                world.setBlockMetadataWithNotify(x, y, z, 13 - SS.getSlimeSize(), 3);
            }
        } else {
            world.setBlockMetadataWithNotify(x, y, z, 14, 2);
            world.scheduleBlockUpdate(x, y, z, this, 60);
        }
View Full Code Here

TOP

Related Classes of net.minecraft.entity.monster.EntitySlime

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.