public virtual float GetTailRotation() { if (IsAngry()) { return(1.53938F); } if (IsTamed()) { return((0.55F - (float)(20 - DataWatcher.GetWatchableObjectInt(18)) * 0.02F) * (float)Math.PI); } else { return((float)Math.PI / 5F); } }
/// <summary> /// Returns the sound this mob makes while it's alive. /// </summary> protected override string GetLivingSound() { if (IsAngry()) { return("mob.wolf.growl"); } if (Rand.Next(3) == 0) { if (IsTamed() && DataWatcher.GetWatchableObjectInt(18) < 10) { return("mob.wolf.whine"); } else { return("mob.wolf.panting"); } } else { return("mob.wolf.bark"); } }
/// <summary> /// The age value may be negative or positive or zero. If it's negative, it get's incremented on each tick, if it's /// positive, it get's decremented each tick. Don't confuse this with EntityLiving.getAge. With a negative value the /// Entity is considered a child. /// </summary> public virtual int GetGrowingAge() { return(DataWatcher.GetWatchableObjectInt(12)); }
public virtual int GetProfession() { return(DataWatcher.GetWatchableObjectInt(16)); }
public virtual int Func_41010_ax() { return(DataWatcher.GetWatchableObjectInt(16)); }
public virtual int Func_41030_m() { return(DataWatcher.GetWatchableObjectInt(18)); }
public virtual int Func_41023_l() { return(DataWatcher.GetWatchableObjectInt(17)); }
/// <summary> /// Gets the forward direction of the entity. /// </summary> public virtual int GetForwardDirection() { return(DataWatcher.GetWatchableObjectInt(18)); }
/// <summary> /// Gets the time since the last hit. /// </summary> public virtual int GetTimeSinceHit() { return(DataWatcher.GetWatchableObjectInt(17)); }
/// <summary> /// Gets the damage taken from the last hit. /// </summary> public virtual int GetDamageTaken() { return(DataWatcher.GetWatchableObjectInt(19)); }
/// <summary> /// Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig. /// </summary> public override bool Interact(EntityPlayer par1EntityPlayer) { ItemStack itemstack = par1EntityPlayer.Inventory.GetCurrentItem(); if (!IsTamed()) { if (itemstack != null && itemstack.ItemID == Item.Bone.ShiftedIndex && !IsAngry()) { if (!par1EntityPlayer.Capabilities.IsCreativeMode) { itemstack.StackSize--; } if (itemstack.StackSize <= 0) { par1EntityPlayer.Inventory.SetInventorySlotContents(par1EntityPlayer.Inventory.CurrentItem, null); } if (!WorldObj.IsRemote) { if (Rand.Next(3) == 0) { SetTamed(true); SetPathToEntity(null); SetAttackTarget(null); AiSit.Func_48407_a(true); SetEntityHealth(20); SetOwner(par1EntityPlayer.Username); Func_48142_a(true); WorldObj.SetEntityState(this, (sbyte)7); } else { Func_48142_a(false); WorldObj.SetEntityState(this, (sbyte)6); } } return(true); } } else { if (itemstack != null && (Item.ItemsList[itemstack.ItemID] is ItemFood)) { ItemFood itemfood = (ItemFood)Item.ItemsList[itemstack.ItemID]; if (itemfood.IsWolfsFavoriteMeat() && DataWatcher.GetWatchableObjectInt(18) < 20) { if (!par1EntityPlayer.Capabilities.IsCreativeMode) { itemstack.StackSize--; } Heal(itemfood.GetHealAmount()); if (itemstack.StackSize <= 0) { par1EntityPlayer.Inventory.SetInventorySlotContents(par1EntityPlayer.Inventory.CurrentItem, null); } return(true); } } if (par1EntityPlayer.Username.ToUpper() == GetOwnerName().ToUpper() && !WorldObj.IsRemote && !IsWheat(itemstack)) { AiSit.Func_48407_a(!IsSitting()); IsJumping = false; SetPathToEntity(null); } } return(base.Interact(par1EntityPlayer)); }