public class EntitySheep extends EntityAnimal implements IShearable
EntityLiving.SpawnPlacementType
spawnableBlock
forcedAge, forcedAgeTimer, growingAge
FLEEING_SPEED_MODIFIER, FLEEING_SPEED_MODIFIER_UUID
experienceValue, inventoryArmorDropChances, inventoryHandsDropChances, jumpHelper, livingSoundTime, moveHelper, navigator, targetTasks, tasks
activeItemStack, activeItemStackUseCount, arrowHitTimer, attackedAtYaw, attackingPlayer, cameraPitch, dead, deathTime, entityAge, HAND_STATES, hurtTime, interpTargetPitch, interpTargetX, interpTargetY, interpTargetYaw, interpTargetZ, isJumping, isSwingInProgress, jumpMovementFactor, lastDamage, limbSwing, limbSwingAmount, maxHurtResistantTime, maxHurtTime, movedDistance, moveForward, moveStrafing, newPosRotationIncrements, onGroundSpeedFactor, prevCameraPitch, prevLimbSwingAmount, prevMovedDistance, prevOnGroundSpeedFactor, prevRenderYawOffset, prevRotationYawHead, prevSwingProgress, randomUnused1, randomUnused2, randomYawVelocity, recentlyHit, renderYawOffset, rotationYawHead, scoreValue, swingingHand, swingProgress, swingProgressInt, ticksElytraFlying, ticksSinceLastSwing, unused180
addedToChunk, cachedUniqueIdString, capturedDrops, captureDrops, chunkCoordX, chunkCoordY, chunkCoordZ, dataManager, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityUniqueID, fallDistance, fireResistance, firstUpdate, forceSpawn, glowing, height, hurtResistantTime, ignoreFrustumCheck, inPortal, inWater, isAirBorne, isCollided, isCollidedHorizontally, isCollidedVertically, isDead, isImmuneToFire, isInWeb, lastPortalPos, lastPortalVec, lastTickPosX, lastTickPosY, lastTickPosZ, motionX, motionY, motionZ, noClip, onGround, portalCounter, posX, posY, posZ, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, rideCooldown, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, teleportDirection, ticksExisted, timeUntilPortal, velocityChanged, width, worldObj
Constructor and Description |
---|
EntitySheep(World worldIn) |
Modifier and Type | Method and Description |
---|---|
protected void |
applyEntityAttributes() |
EntitySheep |
createChild(EntityAgeable ageable) |
void |
eatGrassBonus() |
protected void |
entityInit() |
protected SoundEvent |
getAmbientSound() |
protected SoundEvent |
getDeathSound() |
static float[] |
getDyeRgb(EnumDyeColor dyeColor) |
float |
getEyeHeight() |
EnumDyeColor |
getFleeceColor() |
float |
getHeadRotationAngleX(float p_70890_1_) |
float |
getHeadRotationPointY(float p_70894_1_) |
protected SoundEvent |
getHurtSound() |
protected ResourceLocation |
getLootTable() |
static EnumDyeColor |
getRandomSheepColor(java.util.Random random) |
boolean |
getSheared() |
void |
handleStatusUpdate(byte id) |
protected void |
initEntityAI() |
boolean |
isShearable(ItemStack item,
IBlockAccess world,
BlockPos pos)
Checks if the object is currently shearable
Example: Sheep return false when they have no wool
|
IEntityLivingData |
onInitialSpawn(DifficultyInstance difficulty,
IEntityLivingData livingdata) |
void |
onLivingUpdate() |
java.util.List<ItemStack> |
onSheared(ItemStack item,
IBlockAccess world,
BlockPos pos,
int fortune)
Performs the shear function on this object.
|
protected void |
playStepSound(BlockPos pos,
Block blockIn) |
boolean |
processInteract(EntityPlayer player,
EnumHand hand,
ItemStack stack) |
void |
readEntityFromNBT(NBTTagCompound compound) |
void |
setFleeceColor(EnumDyeColor color) |
void |
setSheared(boolean sheared) |
protected void |
updateAITasks() |
void |
writeEntityToNBT(NBTTagCompound compound) |
attackEntityFrom, canDespawn, canMateWith, consumeItemFromStack, getBlockPathWeight, getCanSpawnHere, getExperiencePoints, getPlayerInLove, getTalkInterval, getYOffset, isBreedingItem, isInLove, resetInLove, setInLove
addGrowth, ageUp, getGrowingAge, isChild, notifyDataManagerChange, onGrowingAdult, setGrowingAge, setScale, setScaleForAge, setSize
detachHome, getHomePosition, getMaximumHomeDistance, hasHome, hasPath, isWithinHomeDistanceCurrentPosition, isWithinHomeDistanceFromPosition, onLeashDistance, setHomePosAndDistance, updateLeashedState
canAttackClass, canBeLeashedTo, canBeSteered, canEquipItem, canPickUpLoot, clearLeashed, createBodyHelper, despawnEntity, dropEquipment, dropFewItems, dropLoot, enablePersistence, faceEntity, getArmorByChance, getArmorInventoryList, getAttackTarget, getDropItem, getEntitySenses, getHeldEquipment, getHorizontalFaceSpeed, getItemStackFromSlot, getJumpHelper, getLeashed, getLeashedToEntity, getLookHelper, getMaxFallHeight, getMaxSpawnedInChunk, getMoveHelper, getNavigator, getNewNavigator, getPathPriority, getPrimaryHand, getRenderSizeModifier, getSlotForItemStack, getVerticalFaceSpeed, isAIDisabled, isItemStackInSlot, isLeftHanded, isNoDespawnRequired, isNotColliding, isServerWorld, onEntityUpdate, onUpdate, playHurtSound, playLivingSound, processInitialInteract, replaceItemInInventory, setAIMoveSpeed, setAttackTarget, setCanPickUpLoot, setDropChance, setEnchantmentBasedOnDifficulty, setEquipmentBasedOnDifficulty, setItemStackToSlot, setLeashedToEntity, setLeftHanded, setMoveForward, setMoveStrafing, setNoAI, setPathPriority, spawnExplosionParticle, startRiding, updateDistance, updateEntityActionState, updateEquipmentIfNeeded
addPotionEffect, applyArmorCalculations, applyPotionDamageCalculations, areAllPotionsAmbient, attackEntityAsMob, attemptTeleport, canBeCollidedWith, canBeHitWithPotion, canBePushed, canBreatheUnderwater, canDropLoot, canEntityBeSeen, clearActivePotions, collideWithEntity, collideWithNearbyEntities, curePotionEffects, damageArmor, damageEntity, damageShield, decreaseAirSupply, dismountEntity, dismountRidingEntity, fall, frostWalk, getAbsorptionAmount, getActiveHand, getActiveItemStack, getActivePotionEffect, getActivePotionEffects, getAge, getAIMoveSpeed, getAITarget, getAlwaysRenderNameTagForRender, getArrowCountInEntity, getAttackingEntity, getAttributeMap, getCapability, getCombatTracker, getCreatureAttribute, getEntityAttribute, getFallSound, getHealth, getHeldItem, getHeldItemMainhand, getHeldItemOffhand, getItemInUseCount, getItemInUseMaxCount, getJumpUpwardsMotion, getLastAttacker, getLastAttackerTime, getLook, getLookVec, getMaxHealth, getRevengeTimer, getRNG, getRotationYawHead, getSoundPitch, getSoundVolume, getSwingProgress, getTicksElytraFlying, getTotalArmorValue, handleJumpLava, handleJumpWater, hasCapability, heal, isActiveItemStackBlocking, isElytraFlying, isEntityAlive, isEntityUndead, isHandActive, isMovementBlocked, isOnLadder, isPlayer, isPlayerSleeping, isPotionActive, isPotionApplicable, jump, kill, knockBack, markPotionsDirty, moveEntityWithHeading, onChangedPotionEffect, onDeath, onDeathUpdate, onFinishedPotionEffect, onItemPickup, onItemUseFinish, onKillCommand, onNewPotionEffect, performHurtAnimation, playEquipSound, removeActivePotionEffect, removePotionEffect, renderBrokenItemStack, resetActiveHand, resetPotionEffectMetadata, sendEndCombat, sendEnterCombat, setAbsorptionAmount, setActiveHand, setArrowCountInEntity, setBeenAttacked, setHealth, setHeldItem, setJumping, setLastAttacker, setPositionAndRotationDirect, setRenderYawOffset, setRevengeTarget, setRotationYawHead, setSprinting, shouldRiderFaceForward, stopActiveHand, swingArm, updateActiveHand, updateArmSwingProgress, updateFallState, updateItemUse, updatePotionEffects, updatePotionMetadata, updateRidden
addChatMessage, addEntityCrashInfo, addPassenger, addTag, addToPlayerScore, addTrackingPlayer, addVelocity, applyEnchantments, applyEntityCollision, applyOrientationToEntity, applyPlayerInteraction, canBeAttackedWithItem, canBeRidden, canCommandSenderUseCommand, canFitPassenger, canPassengerSteer, canRenderOnFire, canRiderInteract, canTriggerWalking, changeDimension, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, decrementTimeUntilPortal, deserializeNBT, doBlockCollisions, doesEntityNotTriggerPressurePlate, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, getAdjustedHorizontalFacing, getAir, getAlwaysRenderNameTag, getBrightness, getBrightnessForRender, getCachedUniqueIdString, getCollisionBorderSize, getCollisionBoundingBox, getCollisionBox, getCommandSenderEntity, getCommandStats, getControllingPassenger, getCustomNameTag, getDataManager, getDisplayName, getDistance, getDistanceSq, getDistanceSq, getDistanceSqToCenter, getDistanceSqToEntity, getDistanceToEntity, getEntityBoundingBox, getEntityData, getEntityId, getEntityString, getEntityWorld, getEquipmentAndArmor, getExplosionResistance, getFlag, getHorizontalFacing, getHoverEvent, getLastPortalVec, getLowestRidingEntity, getMaxInPortalTime, getMirroredYaw, getMountedYOffset, getName, getParts, getPassengers, getPersistentID, getPickedResult, getPortalCooldown, getPosition, getPositionEyes, getPositionVector, getPushReaction, getRecursivePassengers, getRecursivePassengersByType, getRenderBoundingBox, getRenderDistanceWeight, getRidingEntity, getRotatedYaw, getServer, getSoundCategory, getSplashSound, getSwimSound, getTags, getTeam, getTeleportDirection, getUniqueID, getVectorForRotation, handleWaterMovement, hasCustomName, hashCode, hitByEntity, ignoreItemEntityData, isBeingRidden, isBurning, isCreatureType, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInvulnerable, isGlowing, isImmuneToExplosions, isImmuneToFire, isInLava, isInRangeToRender3d, isInRangeToRenderDist, isInsideOfMaterial, isInvisible, isInvisibleToPlayer, isInWater, isNonBoss, isOffsetPositionInLiquid, isOnSameTeam, isOnScoreboardTeam, isOutsideBorder, isPassenger, isPushedByWater, isRiding, isRidingOrBeingRiddenBy, isRidingSameEntity, isSilent, isSneaking, isSpectatedByPlayer, isSprinting, isWet, moveEntity, moveRelative, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, onChunkLoad, onCollideWithPlayer, onKillEntity, onStruckByLightning, playSound, preparePlayerToSpawn, pushOutOfBlocks, rayTrace, readFromNBT, removePassenger, removePassengers, removeTag, removeTrackingPlayer, resetEntityId, resetHeight, resetPositionToBB, sendCommandFeedback, serializeNBT, setAir, setAlwaysRenderNameTag, setAngles, setCommandStat, setCommandStats, setCustomNameTag, setDead, setDropItemsWhenDead, setEntityBoundingBox, setEntityId, setEntityInvulnerable, setFire, setFlag, setGlowing, setInvisible, setInWeb, setLocationAndAngles, setOnFireFromLava, setOutsideBorder, setPortal, setPosition, setPositionAndRotation, setPositionAndUpdate, setPositionNonDirty, setRenderDistanceWeight, setRotation, setSilent, setSneaking, setUniqueId, setVelocity, setWorld, shouldDismountInWater, shouldRenderInPass, shouldRiderSit, shouldSetPosAfterLoading, spawnRunningParticles, startRiding, toString, updatePassenger, verifyExplosion, writeToNBT, writeToNBTAtomically, writeToNBTOptional
public EntitySheep(World worldIn)
public static float[] getDyeRgb(EnumDyeColor dyeColor)
protected void initEntityAI()
initEntityAI
in class EntityLiving
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
@Nullable protected ResourceLocation getLootTable()
getLootTable
in class EntityLiving
public void handleStatusUpdate(byte id)
handleStatusUpdate
in class EntityAnimal
public boolean processInteract(EntityPlayer player, EnumHand hand, @Nullable ItemStack stack)
processInteract
in class EntityAnimal
public float getHeadRotationPointY(float p_70894_1_)
public float getHeadRotationAngleX(float p_70890_1_)
public void writeEntityToNBT(NBTTagCompound compound)
writeEntityToNBT
in class EntityAnimal
public void readEntityFromNBT(NBTTagCompound compound)
readEntityFromNBT
in class EntityAnimal
protected SoundEvent getAmbientSound()
getAmbientSound
in class EntityLiving
protected SoundEvent getHurtSound()
getHurtSound
in class EntityLivingBase
protected SoundEvent 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
@Nullable public IEntityLivingData onInitialSpawn(DifficultyInstance difficulty, @Nullable IEntityLivingData livingdata)
onInitialSpawn
in class EntityLiving
public float getEyeHeight()
getEyeHeight
in class Entity
public boolean isShearable(ItemStack item, IBlockAccess world, BlockPos pos)
IShearable
isShearable
in interface IShearable
item
- The itemstack that is being used, Possible to be nullworld
- The current worldpos
- Block's position in world.public java.util.List<ItemStack> onSheared(ItemStack item, IBlockAccess world, BlockPos pos, int fortune)
IShearable
onSheared
in interface IShearable
item
- The itemstack that is being used, Possible to be nullworld
- The current worldpos
- If this is a block, the block's position in world.fortune
- The fortune level of the shears being used