Java Code Examples for net.minecraft.entity.EntityLiving

The following examples show how to use net.minecraft.entity.EntityLiving. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may want to check out the right sidebar which shows the related API usage.
Example 1
Source Project: TofuCraftReload   Source File: EntityTofuChinger.java    License: MIT License 6 votes vote down vote up
@Override
protected void initEntityAI()
{
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityTofuChinger.AIMeleeAttack());
    this.tasks.addTask(5, new EntityAIWanderAvoidWater(this, 1.0D));
    this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
    this.tasks.addTask(6, new EntityAILookIdle(this));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityLiving.class, 8.0F));

    this.targetTasks.addTask(0, new EntityAIHurtByTarget(this,true));
    this.targetTasks.addTask(1, new EntityAINearestAttackableTarget<>(this, EntityTofuSlime.class,false));
    this.targetTasks.addTask(1, new EntityAINearestAttackableTarget<>(this,EntityPlayer.class,true));
    this.targetTasks.addTask(1, new EntityAINearestAttackableTarget<>(this,EntityTofunian.class,true));
    this.targetTasks.addTask(2, new EntityAINearestAttackableTarget<>(this, EntityRabbit.class,true));
}
 
Example 2
@Override
public void updatePassenger(Entity passenger) {
    super.updatePassenger(passenger);

    if (passenger instanceof EntityLiving) {
        EntityLiving entityliving = (EntityLiving) passenger;
        this.renderYawOffset = entityliving.renderYawOffset;
    }

    if (this.prevRearingAmount > 0.0F) {
        float f3 = MathHelper.sin(this.renderYawOffset * 0.017453292F);
        float f = MathHelper.cos(this.renderYawOffset * 0.017453292F);
        float f1 = 0.7F * this.prevRearingAmount;
        float f2 = 0.15F * this.prevRearingAmount;
        passenger.setPosition(this.posX + f1 * f3, this.posY + this.getMountedYOffset() + passenger.getYOffset() + f2 - 2F, this.posZ - f1 * f);

        if (passenger instanceof EntityLivingBase) {
            ((EntityLivingBase) passenger).renderYawOffset = this.renderYawOffset;
        }
    }
    this.stepHeight = 4F;
}
 
Example 3
@Override
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn) {
	float f = limbSwing;
	float f1 = limbSwingAmount;

	this.lArm01.rotateAngleX = MathHelper.cos(f * 0.6662F) * 0.5F * f1 - 0.20943951023931953F;
	this.rArm01.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 0.5F * f1 - 0.20943951023931953F;
	this.rLeg01.rotateAngleX = MathHelper.cos(f * 0.6662F) * 0.5F * f1 - 0.17453292519943295F;
	this.lLeg01.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 0.5F * f1 - 0.17453292519943295F;
	this.tail01.rotateAngleX = MathHelper.sin(f * 0.2F) * 0.5F * f1 - (float) Math.toRadians(30);

	if (entityIn instanceof EntityLiving) {
		EntityLiving e = (EntityLiving) entityIn;
		float yawOffset = interpolateRotation(e.prevRenderYawOffset, e.renderYawOffset, Minecraft.getMinecraft().getRenderPartialTicks());
		float yawHead = interpolateRotation(e.prevRotationYawHead, e.rotationYawHead, Minecraft.getMinecraft().getRenderPartialTicks());

		this.neck.rotateAngleX = (e.prevRotationPitch + (e.rotationPitch - e.prevRotationPitch) * Minecraft.getMinecraft().getRenderPartialTicks()) * 0.017453292F - 13;
		this.neck.rotateAngleY = (yawHead - yawOffset) * 0.017453292F * 0.5F;
		//if (entityIn instanceof EntityDabSquirrel) {
			//EntityDabSquirrel ent = (EntityDabSquirrel) e;
			//this.chest.rotateAngleX = ent.isBesideClimbableBlock() ? (float) Math.toRadians(-90) : 0.10471975511965977F;
		//}
	}

	super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entityIn);
}
 
Example 4
Source Project: MyTown2   Source File: ProtectionManager.java    License: The Unlicense 6 votes vote down vote up
public static boolean checkExist(Entity entity, boolean spawn) {
    if(entity instanceof EntityLiving) {
        if (Config.instance.mobTravelInTowns.get() && !spawn) {
            return false;
        }
        if(!getFlagValueAtLocation(FlagType.ENTITIES, entity.dimension, (int) Math.floor(entity.posX), (int) Math.floor(entity.posY), (int) Math.floor(entity.posZ))) {
            entity.isDead = true;
            entity.setDead();
            return true;
        }
    }

    for(SegmentEntity segment : segmentsTrackedEntity.get(entity.getClass())) {
        if(!segment.shouldExist(entity)) {
            entity.isDead = true;
            entity.setDead();
            return true;
        }
    }

    return false;
}
 
Example 5
@Override
protected Entity findPlayerToAttack()
{
    if (worldObj.difficultySetting > 0)
    {
        EntityPlayer entityplayer = worldObj.getClosestVulnerablePlayerToEntity(this, 4D);
        if (!getIsTamed() && (entityplayer != null)) // && getIsAdult() )
        {

            if (isNotScared() && isPissed()) { return entityplayer; }

        }
        if ((rand.nextInt(100) == 0))
        {
            EntityLiving entityliving = getClosestEntityLiving(this, 8D);
            return entityliving;
        }
    }
    return null;
}
 
Example 6
@Override
public void onLivingUpdate()
{
    super.onLivingUpdate();
    if(!worldObj.isRemote)
    {
        if(rand.nextInt(15) == 0)
        {
            EntityLiving entityliving = getBoogey(6D);
            if(entityliving != null)
            {
                runLikeHell(entityliving);

            }
        }
        if(!onGround && (ridingEntity != null))
        {
            rotationYaw = ridingEntity.rotationYaw;
        }
    }
}
 
Example 7
Source Project: mocreaturesdev   Source File: MoCTools.java    License: GNU General Public License v3.0 6 votes vote down vote up
public static void buckleMobsNotPlayers(EntityLiving entityattacker, Double dist, World worldObj)
{
    List list = worldObj.getEntitiesWithinAABBExcludingEntity(entityattacker, entityattacker.boundingBox.expand(dist, 2D, dist));
    for (int i = 0; i < list.size(); i++)
    {
        Entity entitytarget = (Entity) list.get(i);
        if (!(entitytarget instanceof EntityLiving) || (entitytarget instanceof EntityPlayer) ||(entityattacker.riddenByEntity != null && entitytarget == entityattacker.riddenByEntity))
        {
            continue;
        }
        //EntityMob entitymob = (EntityMob) entity;
        entitytarget.attackEntityFrom(DamageSource.causeMobDamage(entityattacker), 2);
        bigsmack(entityattacker, entitytarget, 0.6F);
        playCustomSound(entityattacker, "tud", worldObj);
        //todo tuck sound!!
    }
}
 
Example 8
Source Project: ForgeWurst   Source File: MobEspHack.java    License: GNU General Public License v3.0 6 votes vote down vote up
private void renderBoxes(double partialTicks)
{
	for(EntityLiving e : mobs)
	{
		GL11.glPushMatrix();
		GL11.glTranslated(e.prevPosX + (e.posX - e.prevPosX) * partialTicks,
			e.prevPosY + (e.posY - e.prevPosY) * partialTicks,
			e.prevPosZ + (e.posZ - e.prevPosZ) * partialTicks);
		GL11.glScaled(e.width + 0.1, e.height + 0.1, e.width + 0.1);
		
		float f = WEntity.getDistance(WMinecraft.getPlayer(), e) / 20F;
		GL11.glColor4f(2 - f, f, 0, 0.5F);
		
		GL11.glCallList(mobBox);
		
		GL11.glPopMatrix();
	}
}
 
Example 9
Source Project: Artifacts   Source File: DispenserBehaviorMobEgg.java    License: MIT License 6 votes vote down vote up
/**
 * Dispense the specified stack, play the dispense sound and spawn particles.
 */
public ItemStack dispenseStack(IBlockSource par1IBlockSource, ItemStack par2ItemStack)
{
    EnumFacing enumfacing = BlockDispenser.func_149937_b/*getFacing*/(par1IBlockSource.getBlockMetadata());
    double d0 = par1IBlockSource.getX() + (double)enumfacing.getFrontOffsetX();
    double d1 = (double)((float)par1IBlockSource.getYInt() + 0.2F) + enumfacing.getFrontOffsetY();
    double d2 = par1IBlockSource.getZ() + (double)enumfacing.getFrontOffsetZ();
    Entity entity = ItemMonsterPlacer.spawnCreature(par1IBlockSource.getWorld(), par2ItemStack.getItemDamage(), d0, d1, d2);

    if (entity instanceof EntityLiving && par2ItemStack.hasDisplayName())
    {
        ((EntityLiving)entity).setCustomNameTag(par2ItemStack.getDisplayName());
    }

    par2ItemStack.splitStack(1);
    return par2ItemStack;
}
 
Example 10
Source Project: EnderZoo   Source File: EntityUtil.java    License: Creative Commons Zero v1.0 Universal 6 votes vote down vote up
private static boolean canLandAtLocation(EntityLiving ent, int x, int y, int z) {

    World world = ent.getEntityWorld();
    ent.setPosition(x + 0.5, y, z + 0.5);
    if (!SpawnUtil.isSpaceAvailableForSpawn(world, ent, false, false)) {
      return false;
    }

    BlockPos below = new BlockPos(x, y, z).down();
    IBlockState bs = world.getBlockState(below);
    if (!bs.getMaterial().isSolid()) {
      return false;
    }    
    AxisAlignedBB collides = bs.getCollisionBoundingBox(world, below);
    return collides != null;
  }
 
Example 11
public ItemStack getCurrentDisguise() {
    if(transparent) {
        return new ItemStack(Items.potionitem, 1, POTION_METAS[(int)((System.currentTimeMillis() / 1000) % POTION_METAS.length)]);
    }

    Random random = new Random(System.currentTimeMillis() / 1000);
    int first = getRecipeInput(random);
    int firstPos = EntityLiving.getArmorPosition(armorItems[first]);

    int next;
    do {
        next = random.nextInt(armorItems.length);
    }
    while (next == first || EntityLiving.getArmorPosition(armorItems[next]) != firstPos || !canSee(armorItems[next]));
    return armorItems[next];
}
 
Example 12
Source Project: EnderZoo   Source File: EntityUtil.java    License: Creative Commons Zero v1.0 Universal 6 votes vote down vote up
public static void cancelCurrentTasks(EntityLiving ent) {
  Iterator<EntityAITaskEntry> iterator = ent.tasks.taskEntries.iterator();
  List<EntityAITasks.EntityAITaskEntry> currentTasks = new ArrayList<EntityAITasks.EntityAITaskEntry>();
  while (iterator.hasNext()) {
    EntityAITaskEntry entityaitaskentry = iterator.next();
    if (entityaitaskentry != null) {
      currentTasks.add(entityaitaskentry);
    }
  }
  // Only available way to stop current execution is to remove all current
  // tasks, then re-add them
  for (EntityAITaskEntry task : currentTasks) {
    ent.tasks.removeTask(task.action);
    ent.tasks.addTask(task.priority, task.action);
  }
  ent.getNavigator().clearPathEntity();
}
 
Example 13
/**
 * Called to make ridden entities pass on collision to rider
 */
public void Riding()
{
	if ((riddenByEntity != null) && (riddenByEntity instanceof EntityPlayer))
	{
		EntityPlayer entityplayer = (EntityPlayer) riddenByEntity;
		List list = worldObj.getEntitiesWithinAABBExcludingEntity(this, boundingBox.expand(1.0D, 0.0D, 1.0D));
		if (list != null)
		{
			for (int i = 0; i < list.size(); i++)
			{
				Entity entity = (Entity) list.get(i);
				if (entity.isDead)
				{
					continue;
				}
				entity.onCollideWithPlayer(entityplayer);
				if (!(entity instanceof EntityMob))
				{
					continue;
				}
				float f = getDistanceToEntity(entity);
				if ((f < 2.0F) && entity instanceof EntityMob && (rand.nextInt(10) == 0))
				{
					attackEntityFrom(DamageSource.causeMobDamage((EntityLiving) entity), ((EntityMob)entity).getAttackStrength(this));
				}
			}

		}
		if (entityplayer.isSneaking())
		{
			//if (!worldObj.isRemote)
			//{
				this.makeEntityDive();
				//entityplayer.mountEntity(null);
			//}
		}

	}
}
 
Example 14
@Override
public void onLivingUpdate() {
  super.onLivingUpdate();

  if(firstUpdate && !world.isRemote) {
    spawnMount();
  }

  if(isRidingMount()) {
    EntityLiving entLiving = ((EntityLiving) getRidingEntity());
    if(lastAttackTarget != getAttackTarget() || firstUpdate) {
      EntityUtil.cancelCurrentTasks(entLiving);
      lastAttackTarget = getAttackTarget();
    }
  }
  firstUpdate = false;

  if(!isMounted == isRidingMount()) {
    getAiAttackOnCollide().resetTask();
    getAiArrowAttack().resetTask();
    getNavigator().clearPathEntity();
    isMounted = isRidingMount();
  }
  if(isBurning() && isRidingMount()) {
    getRidingEntity().setFire(8);
  }
  if(Config.fallenKnightArchersSwitchToMelee && (!isMounted || !Config.fallKnightMountedArchesMaintainDistance)
      && getAttackTarget() != null && isRanged() && getDistanceSqToEntity(getAttackTarget()) < 5) {     
    setItemStackToSlot(EntityEquipmentSlot.MAINHAND, getSwordForLevel(getRandomEquipmentLevel()));      
  }
}
 
Example 15
Source Project: TofuCraftReload   Source File: RenderTofuGandlem.java    License: MIT License 5 votes vote down vote up
@SuppressWarnings({ "rawtypes", "unchecked" })
public RenderTofuGandlem(RenderManager p_i48864_1_) {
       super(p_i48864_1_, new ModelTofuGandlem(), 0.5F);
       this.addLayer(new LayerGlowEye(this, "textures/mob/tofugandlem/tofugandlem_eye.png") {
		@Override
           public void doRenderLayer(EntityLiving entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
               if (entitylivingbaseIn instanceof EntityTofuGandlem) {
                   if (!((EntityTofuGandlem) entitylivingbaseIn).isSleep()) {
                       super.doRenderLayer(entitylivingbaseIn, limbSwing, limbSwingAmount, partialTicks, ageInTicks, netHeadYaw, headPitch, scale);
                   }
               }
           }
       });
   }
 
Example 16
Source Project: Moo-Fluids   Source File: EntityHelper.java    License: GNU General Public License v3.0 5 votes vote down vote up
public static void addSpawnFromType(final Class<? extends EntityLiving> entityClass,
                                    final int weightedProb, final int min, final int max,
                                    final EnumCreatureType typeOfCreature,
                                    final BiomeDictionary.Type... biomeTypes) {
  final ArrayList<Biome> biomes = new ArrayList<Biome>();
  for (final BiomeDictionary.Type biomeType : biomeTypes) {
    biomes.addAll(BiomeDictionary.getBiomes(biomeType));
  }

  EntityRegistry.addSpawn(entityClass, weightedProb, min, max, typeOfCreature,
                          biomes.toArray(new Biome[biomes.size()]));
}
 
Example 17
Source Project: mocreaturesdev   Source File: MoCRenderBird.java    License: GNU General Public License v3.0 5 votes vote down vote up
@Override
public void doRenderLiving(EntityLiving entityliving, double d, double d1, double d2, float f, float f1)
{

    /*if (!worldObj.multiplayerWorld)
    MoCEntityBird entitybird = (MoCEntityBird)entityliving;
    if(!entitybird.getTypeChosen())
    {
        entitybird.chooseType();
    }*/
    super.doRenderLiving(entityliving, d, d1, d2, f, f1);

}
 
Example 18
Source Project: bartworks   Source File: GT_Teslastaff_Item.java    License: MIT License 5 votes vote down vote up
public boolean hitEntity(ItemStack aStack, EntityLivingBase aTarget, EntityLivingBase aPlayer) {
    if (aTarget instanceof EntityLiving && ElectricItem.manager.canUse(aStack, 9000000)) {
        EntityLiving tTarget = (EntityLiving) aTarget;
        ElectricItem.manager.use(aStack, 9000000, aPlayer);
        for (int i = 1; i < 5; ++i) {
            if (tTarget.getEquipmentInSlot(i) != null && tTarget.getEquipmentInSlot(i).getItem() instanceof IElectricItem) {
                tTarget.setCurrentItemOrArmor(i, null);
            }
        }
    }
    return true;
}
 
Example 19
@Override
public void update(IUpgradableBlock chest, ItemStack stack) {
	if (UpgradeHelper.INSTANCE.getFrequencyTick(chest, stack, 100) != 0) {
		return;
	}

	AxisAlignedBB bb = new AxisAlignedBB(chest.getPosition()).grow(RADIUS);

	TObjectIntMap<Class<? extends EntityLiving>> map = new TObjectIntHashMap<>();

	for (EntityLiving entity : chest.getWorldObj().getEntitiesWithinAABB(EntityLiving.class, bb)) {
		if (entity.isDead) {
			continue;
		}

		if (entity instanceof EntityAnimal) {
			EntityAnimal animal = (EntityAnimal) entity;
			if (entity.isChild()) {
				continue;
			}
			int currentAnimals = map.get(animal.getClass());
			if (currentAnimals < ANIMALS_TO_KEEP_ALIVE) {
				map.put(animal.getClass(), currentAnimals + 1);
				continue;
			}
		}

		if (hasUpgradeOperationCost(chest)) {
			EntityPlayer source = null;
			if (chest.isUpgradeInstalled(DummyUpgradeType.AI.getStack())) {
				source = chest.getFakePlayer();
			}
			entity.attackEntityFrom(getDamageSource(source), 10);
			drawUpgradeOperationCode(chest);
		}
	}
}
 
Example 20
@Override
protected float handleRotationFloat(EntityLiving entityliving, float f)
{
    MoCEntityBunny entitybunny = (MoCEntityBunny) entityliving;
    if (!entitybunny.getIsAdult())
    {
        stretch(entitybunny);
    }
    return entityliving.ticksExisted + f;
}
 
Example 21
@Override
public boolean canHack(Entity entity, EntityPlayer player){
    for(ItemStack stack : ((EntityLiving)entity).getLastActiveItems()) {
        if(stack != null) return true;
    }
    return false;
}
 
Example 22
@Override
protected void preRenderCallback(EntityLiving par1EntityLiving, float par2)
{
    MoCEntityButterfly butterfly = (MoCEntityButterfly) par1EntityLiving;
    if (butterfly.isOnAir() || !butterfly.onGround)
    {
        adjustHeight(butterfly, butterfly.tFloat());
    }
    if (butterfly.climbing())
    {
        rotateAnimal(butterfly);
    }
    stretch(butterfly);
}
 
Example 23
Source Project: mocreaturesdev   Source File: MoCEntityData.java    License: GNU General Public License v3.0 5 votes vote down vote up
public MoCEntityData(Class<? extends EntityLiving> entityClass, EnumCreatureType type, short freq, short min, short max)
{
    this.clazz = entityClass;
    this.typeOfCreature = type;
    this.frequency = freq;
    this.minGroup = min;
    this.maxGroup = max;
}
 
Example 24
Source Project: Kettle   Source File: CraftWorld.java    License: GNU General Public License v3.0 5 votes vote down vote up
@SuppressWarnings("unchecked")
public <T extends Entity> T addEntity(net.minecraft.entity.Entity entity, SpawnReason reason, Consumer<T> function) throws IllegalArgumentException {
    Preconditions.checkArgument(entity != null, "Cannot spawn null entity");

    if (entity instanceof EntityLiving) {
        ((EntityLiving) entity).onInitialSpawn(getHandle().getDifficultyForLocation(new BlockPos(entity)), null);
    }

    if (function != null) {
        function.accept((T) entity.getBukkitEntity());
    }

    world.spawnEntity(entity, reason);
    return (T) entity.getBukkitEntity();
}
 
Example 25
/**
 * Adds the persistenceRequired flag to entities, if they need it in order to not despawn.
 * The checks are probably at most accurate for vanilla entities.
 * @param livingBase
 * @return
 */
public static boolean applyMobPersistence(EntityLiving living)
{
    if (living.isNoDespawnRequired() == false)
    {
        boolean canDespawn = ((living instanceof EntityMob) && living.isNonBoss()) ||
                              (living instanceof EntityWaterMob) ||
                              ((living instanceof EntityTameable) && ((EntityTameable)living).isTamed() == false);

        if (canDespawn == false)
        {
            try
            {
                canDespawn = (boolean) methodHandle_EntityLiving_canDespawn.invokeExact(living);
            }
            catch (Throwable t)
            {
                EnderUtilities.logger.warn("Error while trying to invoke EntityLiving.canDespawn() on entity '{}' via a MethodHandle", living, t);
            }
        }

        if (canDespawn)
        {
            // Sets the persistenceRequired boolean
            living.enablePersistence();
            living.getEntityWorld().playSound(null, living.getPosition(), Sounds.JAILER, SoundCategory.MASTER, 0.8f, 1.2f);

            return true;
        }
    }

    return false;
}
 
Example 26
Source Project: MyTown2   Source File: ProtectionHandlers.java    License: The Unlicense 5 votes vote down vote up
@SubscribeEvent
public void entityJoinWorld(EntityJoinWorldEvent ev) {
    if(MyTown.instance.datasource == null) {
        return;
    }

    if (!(ev.entity instanceof EntityLiving)) {
        return;
    }

    ProtectionManager.checkExist(ev.entity, true);
}
 
Example 27
Source Project: PneumaticCraft   Source File: EntityDrone.java    License: GNU General Public License v3.0 5 votes vote down vote up
public EntityDrone(World world){
    super(world);
    setSize(0.7F, 0.35F);
    ReflectionHelper.setPrivateValue(EntityLiving.class, this, new EntityPathNavigateDrone(this, world), "navigator", "field_70699_by");
    ReflectionHelper.setPrivateValue(EntityLiving.class, this, new DroneMoveHelper(this), "moveHelper", "field_70765_h");
    tasks.addTask(1, chargeAI = new DroneGoToChargingStation(this));
}
 
Example 28
Source Project: ehacks-pro   Source File: ShowArmor.java    License: GNU General Public License v3.0 5 votes vote down vote up
private void drawPotionEffects(EntityLiving entity) {
    int i = 100;
    int j = 10;
    boolean flag = true;
    Collection collection = entity.getActivePotionEffects();
    if (!collection.isEmpty()) {
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        GL11.glDisable(GL11.GL_LIGHTING);
        int k = 33;

        if (collection.size() > 5) {
            k = 132 / (collection.size() - 1);
        }

        for (Iterator iterator = entity.getActivePotionEffects().iterator(); iterator.hasNext(); j += k) {
            PotionEffect potioneffect = (PotionEffect) iterator.next();
            Potion potion = Potion.potionTypes[potioneffect.getPotionID()];
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
            Wrapper.INSTANCE.mc().getTextureManager().bindTexture(new ResourceLocation("textures/gui/container/inventory.png"));
            this.drawTexturedModalRect(i, j, 0, 166, 140, 32);

            if (potion.hasStatusIcon()) {
                int l = potion.getStatusIconIndex();
                this.drawTexturedModalRect(i + 6, j + 7, l % 8 * 18, 198 + l / 8 * 18, 18, 18);
            }

            potion.renderInventoryEffect(i, j, potioneffect, Wrapper.INSTANCE.mc());
            String s1 = I18n.format(potion.getName());

            s1 += " " + potioneffect.getAmplifier();

            Wrapper.INSTANCE.fontRenderer().drawStringWithShadow(s1, i + 10 + 18, j + 6, 16777215);
            String s = Potion.getDurationString(potioneffect);
            Wrapper.INSTANCE.fontRenderer().drawStringWithShadow(s, i + 10 + 18, j + 6 + 10, 8355711);
        }
    }
}
 
Example 29
@Override
protected void preRenderCallback(EntityLiving entityliving, float f)
{
    MoCEntityOstrich entityostrich = (MoCEntityOstrich) entityliving;
    if (entityostrich.getType() == 1)
    {
        stretch(entityostrich);
    }

    super.preRenderCallback(entityliving, f);

}
 
Example 30
Source Project: YouTubeModdingTutorial   Source File: GuardAIFollow.java    License: MIT License 5 votes vote down vote up
public GuardAIFollow(final EntityLiving entity, double speedModifier, float stopDistance, float areaSize) {
    this.entity = entity;
    this.speedModifier = speedModifier;
    this.navigation = entity.getNavigator();
    this.stopDistance = stopDistance;
    this.areaSize = areaSize;
    this.setMutexBits(3);
}