public class EntitySheep extends EntityAnimal
EntityLiving.SpawnPlacementType
Modifier and Type | Field and Description |
---|---|
private static java.util.Map<EnumDyeColor,float[]> |
DYE_TO_RGB |
private EntityAIEatGrass |
entityAIEatGrass |
private InventoryCrafting |
inventoryCrafting
Internal crafting inventory used to check the result of mixing dyes corresponding to the fleece color when
breeding sheep.
|
private int |
sheepTimer
Used to control movement as well as wool regrowth.
|
spawnableBlock
field_175502_b, field_175503_c, growingAge
FLEEING_SPEED_MODIFIER, FLEEING_SPEED_MODIFIER_UUID
equipmentDropChances, experienceValue, jumpHelper, livingSoundTime, moveHelper, navigator, targetTasks, tasks
arrowHitTimer, attackedAtYaw, attackingPlayer, cameraPitch, dead, deathTime, entityAge, field_70741_aB, field_70769_ao, field_70770_ap, hurtTime, isJumping, isSwingInProgress, jumpMovementFactor, lastDamage, limbSwing, limbSwingAmount, maxHurtResistantTime, maxHurtTime, movedDistance, moveForward, moveStrafing, newPosRotationIncrements, newPosX, newPosY, newPosZ, newRotationPitch, newRotationYaw, onGroundSpeedFactor, prevCameraPitch, prevLimbSwingAmount, prevMovedDistance, prevOnGroundSpeedFactor, prevRenderYawOffset, prevRotationYawHead, prevSwingProgress, randomYawVelocity, recentlyHit, renderYawOffset, rotationYawHead, scoreValue, swingProgress, swingProgressInt
addedToChunk, chunkCoordX, chunkCoordY, chunkCoordZ, dataWatcher, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityUniqueID, fallDistance, field_181016_an, field_181017_ao, field_181018_ap, fireResistance, firstUpdate, forceSpawn, height, hurtResistantTime, ignoreFrustumCheck, inPortal, inWater, isAirBorne, isCollided, isCollidedHorizontally, isCollidedVertically, isDead, isImmuneToFire, isInWeb, lastTickPosX, lastTickPosY, lastTickPosZ, motionX, motionY, motionZ, noClip, onGround, portalCounter, posX, posY, posZ, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, renderDistanceWeight, riddenByEntity, ridingEntity, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, ticksExisted, timeUntilPortal, velocityChanged, width, worldObj
Constructor and Description |
---|
EntitySheep(World worldIn) |
Modifier and Type | Method and Description |
---|---|
protected void |
applyEntityAttributes() |
EntitySheep |
createChild(EntityAgeable ageable) |
protected void |
dropFewItems(boolean p_70628_1_,
int p_70628_2_)
Drop 0-2 items of this living's type
|
void |
eatGrassBonus()
This function applies the benefits of growing back wool and faster growing up to the acting entity.
|
protected void |
entityInit() |
static float[] |
func_175513_a(EnumDyeColor dyeColor) |
protected java.lang.String |
getDeathSound()
Returns the sound this mob makes on death.
|
protected Item |
getDropItem() |
private EnumDyeColor |
getDyeColorMixFromParents(EntityAnimal father,
EntityAnimal mother)
Attempts to mix both parent sheep to come up with a mixed dye color.
|
float |
getEyeHeight() |
EnumDyeColor |
getFleeceColor()
Gets the wool color of this sheep.
|
float |
getHeadRotationAngleX(float p_70890_1_) |
float |
getHeadRotationPointY(float p_70894_1_) |
protected java.lang.String |
getHurtSound()
Returns the sound this mob makes when it is hurt.
|
protected java.lang.String |
getLivingSound()
Returns the sound this mob makes while it's alive.
|
static EnumDyeColor |
getRandomSheepColor(java.util.Random random)
Chooses a "vanilla" sheep color based on the provided random.
|
boolean |
getSheared()
returns true if a sheeps wool has been sheared
|
void |
handleStatusUpdate(byte id) |
boolean |
interact(EntityPlayer player)
Called when a player interacts with a mob.
|
IEntityLivingData |
onInitialSpawn(DifficultyInstance difficulty,
IEntityLivingData livingdata)
Called only once on an entity when first time spawned, via egg, mob spawner, natural spawning etc, but not called
when entity is reloaded from nbt.
|
void |
onLivingUpdate()
Called frequently so the entity can update its state every tick as required.
|
protected void |
playStepSound(BlockPos pos,
Block blockIn) |
void |
readEntityFromNBT(NBTTagCompound tagCompund)
(abstract) Protected helper method to read subclass entity data from NBT.
|
void |
setFleeceColor(EnumDyeColor color)
Sets the wool color of this sheep
|
void |
setSheared(boolean sheared)
make a sheep sheared if set to true
|
protected void |
updateAITasks() |
void |
writeEntityToNBT(NBTTagCompound tagCompound)
(abstract) Protected helper method to write subclass entity data to NBT.
|
attackEntityFrom, canDespawn, canMateWith, consumeItemFromStack, getBlockPathWeight, getCanSpawnHere, getExperiencePoints, getPlayerInLove, getTalkInterval, isBreedingItem, isInLove, resetInLove, setInLove
addGrowth, func_175501_a, getGrowingAge, isChild, onGrowingAdult, setGrowingAge, setScale, setScaleForAge, setSize
detachHome, func_142017_o, getHomePosition, getMaximumHomeDistance, hasHome, hasPath, isWithinHomeDistanceCurrentPosition, isWithinHomeDistanceFromPosition, setHomePosAndDistance, updateLeashedState
allowLeashing, canAttackClass, canBeSteered, canPickUpLoot, clearLeashed, despawnEntity, dropEquipment, enablePersistence, faceEntity, func_110146_f, func_175448_a, getArmorItemForSlot, getArmorPosition, getAttackTarget, getCurrentArmor, getEntitySenses, getEquipmentInSlot, getHeldItem, getInventory, getJumpHelper, getLeashed, getLeashedToEntity, getLookHelper, getMaxFallHeight, getMaxSpawnedInChunk, getMoveHelper, getNavigator, getNewNavigator, getRenderSizeModifier, getVerticalFaceSpeed, interactFirst, isAIDisabled, isNoDespawnRequired, isNotColliding, isServerWorld, onEntityUpdate, onUpdate, playLivingSound, replaceItemInInventory, setAIMoveSpeed, setAttackTarget, setCanPickUpLoot, setCurrentItemOrArmor, setEnchantmentBasedOnDifficulty, setEquipmentBasedOnDifficulty, setEquipmentDropChance, setLeashedToEntity, setMoveForward, setNoAI, spawnExplosionParticle, updateEntityActionState, updateEquipmentIfNeeded
addPotionEffect, addRandomDrop, applyArmorCalculations, applyPotionDamageCalculations, attackEntityAsMob, canBeCollidedWith, canBePushed, canBreatheUnderwater, canDropLoot, canEntityBeSeen, clearActivePotions, collideWithEntity, collideWithNearbyEntities, damageArmor, damageEntity, decreaseAirSupply, dismountEntity, fall, func_181013_g, func_94060_bK, getAbsorptionAmount, getActivePotionEffect, getActivePotionEffects, getAge, getAIMoveSpeed, getAITarget, getAlwaysRenderNameTagForRender, getArrowCountInEntity, getAttributeMap, getCombatTracker, getCreatureAttribute, getEntityAttribute, getFallSoundString, getHealth, getJumpUpwardsMotion, getLastAttacker, getLastAttackerTime, getLook, getLookVec, getMaxHealth, getRevengeTimer, getRNG, getRotationYawHead, getSoundPitch, getSoundVolume, getSwingProgress, getTeam, getTotalArmorValue, handleJumpLava, heal, isEntityAlive, isEntityUndead, isMovementBlocked, isOnLadder, isOnSameTeam, isOnTeam, isPlayer, isPlayerSleeping, isPotionActive, isPotionActive, isPotionApplicable, jump, kill, knockBack, markPotionsDirty, mountEntity, moveEntityWithHeading, onChangedPotionEffect, onDeath, onDeathUpdate, onFinishedPotionEffect, onItemPickup, onKillCommand, onNewPotionEffect, performHurtAnimation, removePotionEffect, removePotionEffectClient, renderBrokenItemStack, resetPotionEffectMetadata, sendEndCombat, sendEnterCombat, setAbsorptionAmount, setArrowCountInEntity, setBeenAttacked, setHealth, setJumping, setLastAttacker, setPositionAndRotation2, setRevengeTarget, setRotationYawHead, setSprinting, swingItem, updateAITick, updateArmSwingProgress, updateFallState, updatePotionEffects, updatePotionMetadata, updateRidden
addChatMessage, addEntityCrashInfo, addToPlayerScore, addVelocity, applyEnchantments, applyEntityCollision, canAttackWithItem, canCommandSenderUseCommand, canRenderOnFire, canTriggerWalking, clientUpdateEntityNBT, copyDataFromOld, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, doBlockCollisions, doesEntityNotTriggerPressurePlate, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, func_174817_o, func_181012_aH, func_181014_aG, func_181015_d, getAir, getAlwaysRenderNameTag, getBrightness, getBrightnessForRender, getCollisionBorderSize, getCollisionBoundingBox, getCollisionBox, getCommandSenderEntity, getCommandStats, getCustomNameTag, getDataWatcher, getDisplayName, getDistance, getDistanceSq, getDistanceSq, getDistanceSqToCenter, getDistanceSqToEntity, getDistanceToEntity, getEntityBoundingBox, getEntityId, getEntityString, getEntityWorld, getExplosionResistance, getFlag, getHorizontalFacing, getHoverEvent, getMaxInPortalTime, getMountedYOffset, getName, getNBTTagCompound, getParts, getPortalCooldown, getPosition, getPositionEyes, getPositionVector, getSplashSound, getSwimSound, getUniqueID, getVectorForRotation, getYOffset, handleWaterMovement, hasCustomName, hashCode, hitByEntity, interactAt, isBurning, isEating, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInvulnerable, isImmuneToExplosions, isImmuneToFire, isInLava, isInRangeToRender3d, isInRangeToRenderDist, isInsideOfMaterial, isInvisible, isInvisibleToPlayer, isInWater, isOffsetPositionInLiquid, isOutsideBorder, isPushedByWater, isRiding, isSilent, isSneaking, isSpectatedByPlayer, isSprinting, isWet, moveEntity, moveFlying, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, onChunkLoad, onCollideWithPlayer, onDataWatcherUpdate, onKillEntity, onStruckByLightning, playSound, preparePlayerToSpawn, pushOutOfBlocks, rayTrace, readFromNBT, resetHeight, sendCommandFeedback, setAir, setAlwaysRenderNameTag, setAngles, setCommandStat, setCustomNameTag, setDead, setEating, setEntityBoundingBox, setEntityId, setFire, setFlag, setInvisible, setInWeb, setLocationAndAngles, setOnFireFromLava, setOutsideBorder, setPosition, setPositionAndRotation, setPositionAndUpdate, setRotation, setSilent, setSneaking, setVelocity, setWorld, shouldSetPosAfterLoading, spawnRunningParticles, toString, travelToDimension, updateRiderPosition, verifyExplosion, writeMountToNBT, writeToNBT, writeToNBTOptional
private final InventoryCrafting inventoryCrafting
private static final java.util.Map<EnumDyeColor,float[]> DYE_TO_RGB
private int sheepTimer
private EntityAIEatGrass entityAIEatGrass
public EntitySheep(World worldIn)
public static float[] func_175513_a(EnumDyeColor dyeColor)
protected void updateAITasks()
updateAITasks
in class EntityAnimal
public void onLivingUpdate()
onLivingUpdate
in class EntityAnimal
protected void applyEntityAttributes()
applyEntityAttributes
in class EntityLiving
protected void entityInit()
entityInit
in class EntityAgeable
protected void dropFewItems(boolean p_70628_1_, int p_70628_2_)
dropFewItems
in class EntityLiving
protected Item getDropItem()
getDropItem
in class EntityLiving
public void handleStatusUpdate(byte id)
handleStatusUpdate
in class EntityAnimal
public float getHeadRotationPointY(float p_70894_1_)
public float getHeadRotationAngleX(float p_70890_1_)
public boolean interact(EntityPlayer player)
interact
in class EntityAnimal
public void writeEntityToNBT(NBTTagCompound tagCompound)
writeEntityToNBT
in class EntityAnimal
public void readEntityFromNBT(NBTTagCompound tagCompund)
readEntityFromNBT
in class EntityAnimal
protected java.lang.String getLivingSound()
getLivingSound
in class EntityLiving
protected java.lang.String getHurtSound()
getHurtSound
in class EntityLivingBase
protected java.lang.String getDeathSound()
getDeathSound
in class EntityLivingBase
protected void playStepSound(BlockPos pos, Block blockIn)
playStepSound
in class Entity
public EnumDyeColor getFleeceColor()
public void setFleeceColor(EnumDyeColor color)
public boolean getSheared()
public void setSheared(boolean sheared)
public static EnumDyeColor getRandomSheepColor(java.util.Random random)
public EntitySheep createChild(EntityAgeable ageable)
createChild
in class EntityAgeable
public void eatGrassBonus()
eatGrassBonus
in class EntityLiving
public IEntityLivingData onInitialSpawn(DifficultyInstance difficulty, IEntityLivingData livingdata)
onInitialSpawn
in class EntityLiving
private EnumDyeColor getDyeColorMixFromParents(EntityAnimal father, EntityAnimal mother)
public float getEyeHeight()
getEyeHeight
in class Entity