net.minecraft.entity.passive

## Class EntitySheep

- java.lang.Object
- - net.minecraft.entity.Entity
  - - net.minecraft.entity.EntityLivingBase
    - - net.minecraft.entity.EntityLiving
      - - net.minecraft.entity.EntityCreature
        - - net.minecraft.entity.EntityAgeable
          - - net.minecraft.entity.passive.EntityAnimal
            - - net.minecraft.entity.passive.EntitySheep

- All Implemented Interfaces:
    IAnimals, IShearable

      public class EntitySheep
      extends EntityAnimal
      implements IShearable

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class net.minecraft.entity.Entity

      `Entity.EnumEntitySize`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static float[][]` | `fleeceColorTable`

    - ### Fields inherited from class net.minecraft.entity.EntityCreature

      `entityToAttack, field_110179_h, field_110181_i, fleeingTick, hasAttacked`

    - ### Fields inherited from class net.minecraft.entity.EntityLiving

      `defaultPitch, equipmentDropChances, experienceValue, livingSoundTime, numTicksToChaseTarget, targetTasks, tasks`

    - ### Fields inherited from class net.minecraft.entity.EntityLivingBase

      `arrowHitTimer, attackedAtYaw, attackingPlayer, attackTime, cameraPitch, dead, deathTime, entityAge, field_110154_aX, field_70741_aB, field_70763_ax, field_70764_aw, field_70768_au, field_70769_ao, field_70770_ap, hurtTime, isJumping, isSwingInProgress, jumpMovementFactor, lastDamage, limbSwing, limbSwingAmount, maxHurtResistantTime, maxHurtTime, moveForward, moveStrafing, newPosRotationIncrements, newPosX, newPosY, newPosZ, newRotationPitch, newRotationYaw, prevCameraPitch, prevHealth, prevLimbSwingAmount, prevRenderYawOffset, prevRotationYawHead, prevSwingProgress, randomYawVelocity, recentlyHit, renderYawOffset, rotationYawHead, scoreValue, swingProgress, swingProgressInt`

    - ### Fields inherited from class net.minecraft.entity.Entity

      `addedToChunk, boundingBox, capturedDrops, captureDrops, chunkCoordX, chunkCoordY, chunkCoordZ, dataWatcher, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityUniqueID, extendedProperties, fallDistance, field_70135_K, fireResistance, forceSpawn, height, hurtResistantTime, ignoreFrustumCheck, inPortal, inWater, isAirBorne, isCollided, isCollidedHorizontally, isCollidedVertically, isDead, isImmuneToFire, isInWeb, lastTickPosX, lastTickPosY, lastTickPosZ, motionX, motionY, motionZ, myEntitySize, noClip, onGround, portalCounter, posX, posY, posZ, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, renderDistanceWeight, riddenByEntity, ridingEntity, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, teleportDirection, ticksExisted, timeUntilPortal, velocityChanged, width, worldObj, yOffset, ySize`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EntitySheep(World par1World)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `applyEntityAttributes()`
    `EntitySheep` | `createChild(EntityAgeable par1EntityAgeable)`
    `protected void` | `dropFewItems(boolean par1, int par2)`
    `void` | `eatGrassBonus()`
    `protected void` | `entityInit()`
    `protected void` | `func_145780_a(int p_145780_1_, int p_145780_2_, int p_145780_3_, Block p_145780_4_)`
    `float` | `func_70890_k(float par1)`
    `float` | `func_70894_j(float par1)`
    `protected java.lang.String` | `getDeathSound()`
    `protected Item` | `getDropItem()`
    `int` | `getFleeceColor()`
    `protected java.lang.String` | `getHurtSound()`
    `protected java.lang.String` | `getLivingSound()`
    `static int` | `getRandomFleeceColor(java.util.Random par0Random)`
    `boolean` | `getSheared()`
    `void` | `handleHealthUpdate(byte par1)`
    `boolean` | `interact(EntityPlayer par1EntityPlayer)`
    `protected boolean` | `isAIEnabled()`
    `boolean` | `isShearable(ItemStack item, IBlockAccess world, int x, int y, int z)` Checks if the object is currently shearable Example: Sheep return false when they have no wool
    `void` | `onLivingUpdate()`
    `java.util.ArrayList<ItemStack>` | `onSheared(ItemStack item, IBlockAccess world, int x, int y, int z, int fortune)` Performs the shear function on this object.
    `IEntityLivingData` | `onSpawnWithEgg(IEntityLivingData par1EntityLivingData)`
    `void` | `readEntityFromNBT(NBTTagCompound par1NBTTagCompound)`
    `void` | `setFleeceColor(int par1)`
    `void` | `setSheared(boolean par1)`
    `protected void` | `updateAITasks()`
    `void` | `writeEntityToNBT(NBTTagCompound par1NBTTagCompound)`

    - ### Methods inherited from class net.minecraft.entity.passive.EntityAnimal

      `attackEntity, attackEntityFrom, canDespawn, canMateWith, findPlayerToAttack, func_146082_f, func_146083_cb, getBlockPathWeight, getCanSpawnHere, getExperiencePoints, getTalkInterval, isBreedingItem, isInLove, resetInLove, updateAITick`

    - ### Methods inherited from class net.minecraft.entity.EntityAgeable

      `addGrowth, getGrowingAge, isChild, setGrowingAge, setScale, setScaleForAge, setSize`

    - ### Methods inherited from class net.minecraft.entity.EntityCreature

      `detachHome, func_110174_bM, func_142017_o, getEntityToAttack, getHomePosition, hasHome, hasPath, isMovementCeased, isWithinHomeDistance, isWithinHomeDistanceCurrentPosition, setHomeArea, setPathToEntity, setTarget, updateEntityActionState, updateLeashedState, updateWanderPath`

    - ### Methods inherited from class net.minecraft.entity.EntityLiving

      `addRandomArmor, allowLeashing, canAttackClass, canBeSteered, canPickUpLoot, clearLeashed, despawnEntity, dropEquipment, enchantEquipment, faceEntity, func_110146_f, func_110163_bv, func_130225_q, getAlwaysRenderNameTag, getAlwaysRenderNameTagForRender, getArmorItemForSlot, getArmorPosition, getAttackTarget, getCommandSenderName, getCustomNameTag, getEntitySenses, getEquipmentInSlot, getHeldItem, getJumpHelper, getLastActiveItems, getLeashed, getLeashedToEntity, getLookHelper, getMaxSafePointTries, getMaxSpawnedInChunk, getMoveHelper, getNavigator, getRenderSizeModifier, getVerticalFaceSpeed, hasCustomNameTag, interactFirst, isNoDespawnRequired, onEntityUpdate, onUpdate, playLivingSound, setAIMoveSpeed, setAlwaysRenderNameTag, setAttackTarget, setCanPickUpLoot, setCurrentItemOrArmor, setCustomNameTag, setEquipmentDropChance, setLeashedToEntity, setMoveForward, spawnExplosionParticle`

    - ### Methods inherited from class net.minecraft.entity.EntityLivingBase

      `addPotionEffect, applyArmorCalculations, applyPotionDamageCalculations, attackEntityAsMob, canBeCollidedWith, canBePushed, canBreatheUnderwater, canEntityBeSeen, clearActivePotions, collideWithEntity, collideWithNearbyEntities, curePotionEffects, damageArmor, damageEntity, decreaseAirSupply, dismountEntity, dropRareDrop, fall, func_110142_aN, func_142015_aE, func_146066_aG, func_146067_o, func_94060_bK, getAbsorptionAmount, getActivePotionEffect, getActivePotionEffects, getAge, getAIMoveSpeed, getAITarget, getArrowCountInEntity, getAttributeMap, getCreatureAttribute, getEntityAttribute, getEyeHeight, getHealth, getItemIcon, getLastAttacker, getLastAttackerTime, getLook, getLookVec, getMaxHealth, getPosition, getRNG, getRotationYawHead, getSoundPitch, getSoundVolume, getSwingProgress, getTeam, getTotalArmorValue, heal, isClientWorld, isEntityAlive, isEntityUndead, isMovementBlocked, isOnLadder, isOnSameTeam, isOnTeam, isPlayer, isPlayerSleeping, isPotionActive, isPotionActive, isPotionApplicable, jump, kill, knockBack, moveEntityWithHeading, onChangedPotionEffect, onDeath, onDeathUpdate, onFinishedPotionEffect, onItemPickup, onNewPotionEffect, performHurtAnimation, rayTrace, removePotionEffect, removePotionEffectClient, renderBrokenItemStack, setAbsorptionAmount, setArrowCountInEntity, setBeenAttacked, setHealth, setJumping, setLastAttacker, setPositionAndRotation2, setPositionAndUpdate, setRevengeTarget, setRotationYawHead, setSprinting, shouldRiderFaceForward, swingItem, updateArmSwingProgress, updateFallState, updatePotionEffects, updateRidden`

    - ### Methods inherited from class net.minecraft.entity.Entity

      `addEntityCrashInfo, addToPlayerScore, addVelocity, applyEntityCollision, canAttackWithItem, canRenderOnFire, canRiderInteract, canTriggerWalking, copyDataFrom, copyLocationAndAnglesFrom, dealFireDamage, doesEntityNotTriggerPressurePlate, dropItem, entityDropItem, equals, extinguish, func_145748_c_, func_145771_j, func_145772_a, func_145774_a, func_145775_I, func_145778_a, func_145781_i, getAir, getBoundingBox, getBrightness, getBrightnessForRender, getCollisionBorderSize, getCollisionBox, getDataWatcher, getDistance, getDistanceSq, getDistanceSqToEntity, getDistanceToEntity, getEntityData, getEntityId, getEntityString, getExtendedProperties, getFlag, getMaxInPortalTime, getMountedYOffset, getParts, getPersistentID, getPickedResult, getPortalCooldown, getShadowSize, getSplashSound, getSwimSound, getTeleportDirection, getUniqueID, getYOffset, handleLavaMovement, handleWaterMovement, hashCode, hitByEntity, isBurning, isCreatureType, isEating, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInvulnerable, isImmuneToFire, isInRangeToRender3d, isInRangeToRenderDist, isInsideOfMaterial, isInvisible, isInvisibleToPlayer, isInWater, isOffsetPositionInLiquid, isPushedByWater, isRiding, isSneaking, isSprinting, isWet, mountEntity, moveEntity, moveFlying, newDoubleNBTList, newFloatNBTList, onChunkLoad, onCollideWithPlayer, onKillEntity, onStruckByLightning, playSound, preparePlayerToSpawn, readFromNBT, registerExtendedProperties, resetEntityId, setAir, setAngles, setDead, setEating, setEntityId, setFire, setFlag, setInPortal, setInvisible, setInWeb, setLocationAndAngles, setOnFireFromLava, setPosition, setPositionAndRotation, setRotation, setSneaking, setVelocity, setWorld, shouldDismountInWater, shouldRenderInPass, shouldRiderSit, shouldSetPosAfterLoading, toString, travelToDimension, updateRiderPosition, writeMountToNBT, writeToNBT, writeToNBTOptional`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### fleeceColorTable

          public static final float[][] fleeceColorTable

  - ### Constructor Detail

    - #### EntitySheep

          public EntitySheep(World par1World)

  - ### Method Detail

    - #### isAIEnabled

          protected boolean isAIEnabled()

      Overrides:
        `isAIEnabled` in class `EntityLiving`

    - #### updateAITasks

          protected void updateAITasks()

      Overrides:
        `updateAITasks` in class `EntityLiving`

    - #### onLivingUpdate

          public void onLivingUpdate()

      Overrides:
        `onLivingUpdate` in class `EntityAnimal`

    - #### applyEntityAttributes

          protected void applyEntityAttributes()

      Overrides:
        `applyEntityAttributes` in class `EntityLiving`

    - #### entityInit

          protected void entityInit()

      Overrides:
        `entityInit` in class `EntityAgeable`

    - #### dropFewItems

          protected void dropFewItems(boolean par1,
                          int par2)

      Overrides:
        `dropFewItems` in class `EntityLiving`

    - #### getDropItem

          protected Item getDropItem()

      Overrides:
        `getDropItem` in class `EntityLiving`

    - #### handleHealthUpdate

          public void handleHealthUpdate(byte par1)

      Overrides:
        `handleHealthUpdate` in class `EntityAnimal`

    - #### interact

          public boolean interact(EntityPlayer par1EntityPlayer)

      Overrides:
        `interact` in class `EntityAnimal`

    - #### func_70894_j

          public float func_70894_j(float par1)

    - #### func_70890_k

          public float func_70890_k(float par1)

    - #### writeEntityToNBT

          public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound)

      Overrides:
        `writeEntityToNBT` in class `EntityAnimal`

    - #### readEntityFromNBT

          public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)

      Overrides:
        `readEntityFromNBT` in class `EntityAnimal`

    - #### getLivingSound

          protected java.lang.String getLivingSound()

      Overrides:
        `getLivingSound` in class `EntityLiving`

    - #### getHurtSound

          protected java.lang.String getHurtSound()

      Overrides:
        `getHurtSound` in class `EntityLivingBase`

    - #### getDeathSound

          protected java.lang.String getDeathSound()

      Overrides:
        `getDeathSound` in class `EntityLivingBase`

    - #### func_145780_a

          protected void func_145780_a(int p_145780_1_,
                           int p_145780_2_,
                           int p_145780_3_,
                           Block p_145780_4_)

      Overrides:
        `func_145780_a` in class `Entity`

    - #### getFleeceColor

          public int getFleeceColor()

    - #### setFleeceColor

          public void setFleeceColor(int par1)

    - #### getSheared

          public boolean getSheared()

    - #### setSheared

          public void setSheared(boolean par1)

    - #### getRandomFleeceColor

          public static int getRandomFleeceColor(java.util.Random par0Random)

    - #### createChild

          public EntitySheep createChild(EntityAgeable par1EntityAgeable)

      Specified by:
        `createChild` in class `EntityAgeable`

    - #### eatGrassBonus

          public void eatGrassBonus()

      Overrides:
        `eatGrassBonus` in class `EntityLiving`

    - #### onSpawnWithEgg

          public IEntityLivingData onSpawnWithEgg(IEntityLivingData par1EntityLivingData)

      Overrides:
        `onSpawnWithEgg` in class `EntityLiving`

    - #### isShearable

          public boolean isShearable(ItemStack item,
                            IBlockAccess world,
                            int x,
                            int y,
                            int z)

      Description copied from interface: `IShearable`
      Checks if the object is currently shearable Example: Sheep return false when they have no wool
      Specified by:
        `isShearable` in interface `IShearable`
      Parameters:
        `item` - The itemstack that is being used, Possible to be null
        `world` - The current world
        `x` - The X Position
        `y` - The Y Position
        `z` - The Z Position
      Returns:
        If this is shearable, and onSheared should be called.

    - #### onSheared

          public java.util.ArrayList<ItemStack> onSheared(ItemStack item,
                                                 IBlockAccess world,
                                                 int x,
                                                 int y,
                                                 int z,
                                                 int fortune)

      Description copied from interface: `IShearable`
      Performs the shear function on this object. This is called for both client, and server. The object should perform all actions related to being sheared, except for dropping of the items, and removal of the block. As those are handled by ItemShears itself. Returns a list of items that resulted from the shearing process. For entities, they should trust there internal location information over the values passed into this function.
      Specified by:
        `onSheared` in interface `IShearable`
      Parameters:
        `item` - The itemstack that is being used, Possible to be null
        `world` - The current world
        `x` - The X Position
        `y` - The Y Position
        `z` - The Z Position
        `fortune` - The fortune level of the shears being used
      Returns:
        A ArrayList containing all items from this shearing. Possible to be null.