Package net.minecraft.src
Class EntitySheep
- All Implemented Interfaces:
IAnimals
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final float[][]Holds the RGB table of the sheep colors - in OpenGL glColor3f values - used to render the sheep colored fleece.Fields inherited from class net.minecraft.src.EntityAnimal
BASE_GRAZE_FOOD_VALUE, breeding, DELAY_BETWEEN_EAT_LOOSE_VARIANCE, eatLooseCooldownCounter, FAMISHED_SPEED_MODIFIER_UUID, famishedSpeedModifier, FULL_HUNGER_COUNT, grazeProgressCounter, healingCountdown, HUNGER_LEVEL_DATA_WATCHER_ID, hungerCountdown, IN_LOVE_DATA_WATCHER_ID, LEVEL_UP_HUNGER_COUNT, m_iDelayBetweenEatLoose, MAX_HEALING_COUNT, STARVING_SPEED_MODIFIER_UUID, starvingSpeedModifier, uncomfortableTick, WEARING_BREEDING_HARNESS_DATA_WATCHER_IDFields inherited from class net.minecraft.src.EntityCreature
entityToAttack, field_110179_h, field_110181_i, fleeingTick, hasAttacked, homeDimension, maximumHomeDistance, pathToEntity, possessionTimerFields inherited from class net.minecraft.src.EntityLiving
defaultPitch, equipmentDropChances, experienceValue, HAS_ATTACK_TARGET_DATA_WATCHER_ID, livingSoundTime, numTicksToChaseTarget, targetTasks, tasksFields inherited from class net.minecraft.src.EntityLivingBase
arrowHitTimer, attackedAtYaw, attackingPlayer, attackTime, cameraPitch, dead, deathTime, entityAge, entityLivingToAttack, field_110154_aX, field_70741_aB, field_70763_ax, field_70764_aw, field_70768_au, field_70769_ao, field_70770_ap, hurtTime, isJumping, isLivingDead, isSwingInProgress, jumpMovementFactor, landMovementFactor, lastDamage, limbSwing, limbSwingAmount, maxHurtResistantTime, maxHurtTime, moveForward, moveStrafing, newPosRotationIncrements, newPosX, newPosY, newPosZ, newRotationPitch, newRotationYaw, onChoppingBlockMaxCountdown, prevCameraPitch, prevHealth, prevLimbSwingAmount, prevRenderYawOffset, prevRotationYawHead, prevSwingProgress, randomYawVelocity, recentlyHit, recentlyOnChoppingBlockCountdown, renderYawOffset, revengeCountdown, revengeTimer, rotationYawHead, scoreValue, swingProgress, swingProgressIntFields inherited from class net.minecraft.src.Entity
addedToChunk, boundingBox, chunkCoordX, chunkCoordY, chunkCoordZ, dataWatcher, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityId, fallDistance, field_70135_K, fireResistance, forceSpawn, height, hurtResistantTime, ignoreFrustumCheck, inPortal, inWater, isAirBorne, isCollided, isCollidedHorizontally, isCollidedVertically, isDead, isImmuneToFire, isInWeb, lastGroundPosX, lastGroundPosY, lastGroundPosZ, lastTickPosX, lastTickPosY, lastTickPosZ, motionX, motionY, motionZ, myEntitySize, nextBlockCheckDistance, 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 -
Method Summary
Modifier and TypeMethodDescriptionprotected voidintblendParentColors(EntitySheep papa, EntitySheep mama) createChild(EntityAgeable parent) protected voiddropFewItems(boolean bKilledByPlayer, int iLootingModifier) Drop 0-2 items of this living's type.voidThis function applies the benefits of growing back wool and faster growing up to the acting entity.protected voidprotected voidfall(float par1) Called when the mob is falling.floatfunc_70890_k(float fPartialTick) floatfunc_70894_j(float fPartialTick) func_90015_b(EntityAgeable par1EntityAgeable) booleanprotected StringReturns the sound this mob makes on death.protected intReturns the item ID for the item the mob drops on death.intintprotected StringReturns the sound this mob makes when it is hurt.protected StringReturns the sound this mob makes while it's alive.doubleReturns the Y offset from the entity's position for any entity riding this one.intgetMutantColor(EntitySheep papa, EntitySheep mama) intstatic intgetRandomFleeceColor(Random par0Random) This method is called when a sheep spawns in the world to select the color of sheep fleece.booleanreturns true if a sheeps wool has been shearedvoidhandleHealthUpdate(byte bUpdateType) booleaninteract(EntityPlayer player) Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig.booleanReturns true if the newer Entity AI code should be runbooleanisBreedingItem(ItemStack stack) Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on the animal type)booleanprotected booleanbooleanprotected voidvoidbooleanonBlockDispenserConsume(BlockDispenserBlock blockDispenser, BlockDispenserTileEntity tileEntity) Called when block dispenser tries to eat this entity, return true if the Dispenser should stop looking for more stuff to consumevoidonDeath(DamageSource damageSource) Called when the mob's health reaches 0.voidCalled frequently so the entity can update its state every tick as required.protected voidplayStepSound(int par1, int par2, int par3, int par4) Plays step sound at given x, y, z for the entityvoidreadEntityFromNBT(NBTTagCompound par1NBTTagCompound) (abstract) Protected helper method to read subclass entity data from NBT.voidsetFleeceColor(int par1) voidsetOriginalFleeceColor(int originalColor) voidsetSheared(boolean par1) make a sheep sheared if set to truevoidsetSuperficialFleeceColor(int par1) spawnHardcoreBaby(EntityAgeable parentAnimal) voidvoidwriteEntityToNBT(NBTTagCompound par1NBTTagCompound) (abstract) Protected helper method to write subclass entity data to NBT.Methods inherited from class net.minecraft.src.EntityAnimal
addToHungerCount, attackEntity, attackEntityFrom, attemptToBeHandFedItem, attemptToEatItem, attemptToEatItemForBreeding, attemptToEatLooseItem, attemptToPossessNearbyCreatureOnDeath, breakLeash, canChildGrow, canDespawn, canGrazeMycelium, canGrazeOnBlock, canGrazeOnRoughVegetation, canLoveJuiceRegenerate, canMateWith, checkForIntersectingBreedingHarnesses, checkForLooseFood, checkForScrollDrop, entityAnimalInteract, findPlayerToAttack, func_110196_bT, getBlockPathWeight, getCanSpawnHere, getDisruptsEarthOnGraze, getExperiencePoints, getGrazeBlockForPos, getGrazeDuration, getGrazeHeadRotation, getGrazeHeadRotationMagnitudeDivisor, getGrazeHeadRotationRateMultiplier, getGrazeHeadVerticalOffset, getGrazeHungerGain, getHungerLevel, getHungerSpeedModifier, getInLove, getItemFoodValue, getNestSize, getSoundPitch, getTalkInterval, getTicksForChildToGrow, getTicksToRegenerateLoveJuice, getWearingBreedingHarness, giveBirthAtTargetLocation, initHungerWithVariance, isEdibleItem, isFamished, isFullyFed, isHungryEnoughToEatLooseFood, isHungryEnoughToForceMoveToGraze, isHungryEnoughToGraze, isInLove, isReadyToEatBreedingItem, isReadyToEatLooseFood, isReadyToEatLooseItem, isSecondaryTargetForSquid, isStarving, isTemptingItem, isTooHungryToGrow, isTooHungryToHeal, jump, onBecomeStarving, onEatBreedingItem, onFlungBySquidTentacle, onGrazeBlock, onHeadCrabbedBySquid, onNearbyAnimalAttacked, onNearbyFireStartAttempt, onNearbyPlayerBlockAddOrRemove, onNearbyPlayerStartles, onStarvingCountExpired, panicNearbyAnimals, playGrazeFX, procreate, resetHealingCountdown, resetHungerCountdown, resetInLove, resetMatingStateOfBothParents, setHungerLevel, setInLove, setRevengeTarget, setWearingBreedingHarness, shouldNotifyBlockOnGraze, shouldStayInPlaceToGraze, spawnBirthHeartParticles, updateAITick, updateEntityActionState, updateHealing, updateHungerSpeedModifierMethods inherited from class net.minecraft.src.EntityAgeable
addGrowth, adjustSizeForAge, entityAgeableInteract, getGrowingAge, isChild, setGrowingAge, setScale, setScaleForAge, setSizeMethods inherited from class net.minecraft.src.EntityCreature
attemptToPossessCreaturesAroundBlock, attemptToPossessNearbyCreature, canSoulAffectEntity, detachHome, entityCreatureEntityInit, func_110159_bB, func_110173_bK, func_110174_bM, func_110176_b, func_142017_o, getCanCreatureBePossessedFromDistance, getEntityToAttack, getHomePosition, getInitialPossessionChance, getPossessionLevel, getTimeToFullPossession, handlePossession, hasHome, hasPath, initiatePossession, isFullyPossessed, isMovementCeased, isPossessed, onFullPossession, onInitialPossession, playFullPossessionSound, setHomeArea, setHomeArea, setPathToEntity, setPossessionLevel, setTarget, shouldContinueAttacking, transmitAttackTargetToClients, updateWanderPathMethods inherited from class net.minecraft.src.EntityLiving
addRandomArmor, allowLeashing, attackEntityAsMob, attractsLightning, canAttackClass, canBeSteered, canEntityCenterOfMassBeSeen, canPickUpLoot, clearLeashed, despawnEntity, doesEntityApplyToSpawnCap, dropEquipment, enchantEquipment, entityLivingAddRandomArmor, entityLivingDropFewItems, entityLivingOnLivingUpdate, entityLivingOnSpawnWithEgg, entityLivingSetAttackTarget, entityLivingUpdateAITasks, faceEntity, func_110146_f, func_110163_bv, func_130225_q, getAlwaysRenderNameTag, getAlwaysRenderNameTagForRender, getArmorItemForSlot, getArmorPosition, getAttackTarget, getCurrentArmorBTW, getCurrentItemOrArmor, getCustomNameTag, getEntityName, getEntitySenses, getHeldItem, getJumpHelper, getLastActiveItems, getLeashed, getLeashedToEntity, getLookHelper, getMaxSafePointTries, getMaxSpawnedInChunk, getMoveHelper, getNavigator, getRenderSizeModifier, getVerticalFaceSpeed, hasAttackTarget, hasCustomNameTag, installationIntegrityTest, interactFirst, isInsideSpawnAreaAroundChunk, isInsideSpawnAreaAroundOriginalSpawn, isInsideSpawnAreaAroundPlayer, isNoDespawnRequired, meleeAttack, minDistFromPlayerForDespawn, onClimbWhileSwimming, onEntityUpdate, onUpdate, outOfUpdateRangeUpdate, playLivingSound, preInitCreature, setAIMoveSpeed, setAlwaysRenderNameTag, setAttackTarget, setCanPickUpLoot, setCurrentItemOrArmor, setCustomNameTag, setEquipmentDropChance, setLeashedToEntity, setMoveForward, setPersistent, spawnerInitCreature, spawnExplosionParticle, updateAITasksMethods inherited from class net.minecraft.src.EntityLivingBase
addPotionEffect, applyArmorCalculations, applyPotionDamageCalculations, canBeCollidedWith, canBePushed, canBreatheUnderwater, canEntityBeSeen, canJump, canJumpMidWater, canSwim, checkForHeadDrop, checkForRareDrop, clearActivePotions, collideWithEntity, collideWithNearbyEntities, damageArmor, damageEntity, decreaseAirSupply, dismountEntity, dropHead, dropRareDrop, entityLivingBaseFall, entityLivingOnDeath, func_110142_aN, func_142015_aE, func_94060_bK, getAbsorptionAmount, getActivePotionEffect, getActivePotionEffects, getAge, getAIMoveSpeed, getAITarget, getAmbientLootingModifier, getArrowCountInEntity, getAttributeMap, getCreatureAttribute, getDefaultSlipperinessOnGround, getEntityAttribute, getEyeHeight, getHealth, getHealthAndExhaustionModifier, getItemIcon, getLadderVerticalMovementModifier, getLandMovementModifier, getLastAttacker, getLastAttackerTime, getLook, getLookVec, getMaxHealth, getMeleeAttackStrength, getPosition, getRNG, getRotationYawHead, getSlipperinessRelativeToBlock, getSoundVolume, getSpeedModifier, getSwimmingHorizontalModifier, getSwingProgress, getTeam, getTotalArmorValue, heal, isClientWorld, isEntityAlive, isEntityUndead, isMovementBlocked, isOnLadder, isOnSameTeam, isOnTeam, isPlayer, isPlayerSleeping, isPotionActive, isPotionActive, isPotionApplicable, isWeighted, isWeightedByHeadCrab, kill, knockBack, knockbackMagnitude, mouseOverCustomRayTrace, moveEntityWithHeading, onChangedPotionEffect, onDeathUpdate, onFinishedPotionEffect, onItemPickup, onNewPotionEffect, performHurtAnimation, rayTrace, recoverAirSupply, removePotionEffect, removePotionEffectClient, renderBrokenItemStack, setAbsorptionAmount, setArrowCountInEntity, setBeenAttacked, setHealth, setJumping, setLastAttacker, setPositionAndRotation2, setPositionAndUpdate, setRotationYawHead, setSprinting, swingItem, updateArmSwingProgress, updateFallState, updatePotionEffects, updateRiddenMethods inherited from class net.minecraft.src.Entity
addComponent, addEntityCrashInfo, addToPlayerScore, addVelocity, appliesConstantForceWhenRidingBoat, applyEntityCollision, canAttackWithItem, canCollideWithEntity, canEntityTriggerTripwire, canRenderOnFire, canTriggerWalking, copyDataFrom, copyLocationAndAnglesFrom, dealFireDamage, doBlockCollisions, doesEntityApplyToSquidPossessionCap, doesEntityNotTriggerPressurePlate, doesNotDismountInWater, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, flagAllWatchedObjectsDirty, flingAwayFromEntity, getAir, getAnimalKickMovementMultiplier, getBlockExplosionResistance, getBoundingBox, getBrightness, getBrightnessForRender, getCanBeHeadCrabbed, getCollisionBorderSize, getCollisionBox, getComponent, getDataWatcher, getDistance, getDistanceSq, getDistanceSqToEntity, getDistanceToEntity, getEntityString, getFlag, getHeadCrabSharedAttackTarget, getMaxInPortalTime, getParts, getPortalCooldown, getShadowSize, getTeleportDirection, getTranslatedEntityName, getUniqueID, getVisualBoundingBox, getXZDistanceSqToEntity, getYOffset, handleLavaMovement, handleWaterMovement, hasComponent, hashCode, hasHeadCrabbedSquid, hitByEntity, initComponents, isAffectedByMovementModifiers, isBeingRainedOn, isBurning, isEating, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInsideOpaqueBlock, isEntityInsideSuffocatingBlock, isEntityInsideSuffocatingBlock, isEntityInvulnerable, isImmuneToFire, isImmuneToHeadCrabDamage, isInRangeToRenderDist, isInRangeToRenderVec3D, isInsideOfMaterial, isInvisible, isInvisibleToPlayer, isInWater, isItemEntity, isOffsetPositionInLiquid, isPushedByWater, isRiding, isSneaking, isSprinting, isUsingSpecialKey, isValidOngoingAttackTargetForSquid, isWet, mountEntity, mountEntityRemote, moveEntity, moveFlying, movementModifierWhenRidingBoat, newDoubleNBTList, newFloatNBTList, notifyOfWolfHowl, onChunkLoad, onCollideWithPlayer, onKickedByAnimal, onKillEntity, onPossessedRidingEntityDeath, onStruckByLightning, playSound, preparePlayerToSpawn, pushOutOfBlocks, readFromNBT, setAir, setAngles, setDead, setEating, setFire, setFlag, setInPortal, setInvisible, setInWeb, setLocationAndAngles, setOnFireFromLava, setPosition, setPositionAndRotation, setRotation, setSneaking, setVelocity, setWorld, shouldExplodeBlock, shouldSetPosAfterLoading, shouldSetPositionOnLoad, toString, travelToDimension, tryToSetFireToBlocksInContact, updateCloak, updateRiderPosition, writeMountToNBT, writeToNBT, writeToNBTOptional
-
Field Details
-
fleeceColorTable
public static final float[][] fleeceColorTableHolds the RGB table of the sheep colors - in OpenGL glColor3f values - used to render the sheep colored fleece.
-
-
Constructor Details
-
EntitySheep
-
-
Method Details
-
onLivingUpdate
public void onLivingUpdate()Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons use this to react to sunlight and start to burn.- Overrides:
onLivingUpdatein classEntityAnimal
-
applyEntityAttributes
protected void applyEntityAttributes()- Overrides:
applyEntityAttributesin classEntityLiving
-
entityInit
protected void entityInit()- Overrides:
entityInitin classEntityAnimal
-
writeEntityToNBT
(abstract) Protected helper method to write subclass entity data to NBT.- Overrides:
writeEntityToNBTin classEntityAnimal
-
readEntityFromNBT
(abstract) Protected helper method to read subclass entity data from NBT.- Overrides:
readEntityFromNBTin classEntityAnimal
-
getLivingSound
Returns the sound this mob makes while it's alive.- Overrides:
getLivingSoundin classEntityLiving
-
getHurtSound
Returns the sound this mob makes when it is hurt.- Overrides:
getHurtSoundin classEntityLivingBase
-
getDeathSound
Returns the sound this mob makes on death.- Overrides:
getDeathSoundin classEntityLivingBase
-
playStepSound
protected void playStepSound(int par1, int par2, int par3, int par4) Plays step sound at given x, y, z for the entity- Overrides:
playStepSoundin classEntity
-
getFleeceColor
public int getFleeceColor() -
setFleeceColor
public void setFleeceColor(int par1) -
getSheared
public boolean getSheared()returns true if a sheeps wool has been sheared -
setSheared
public void setSheared(boolean par1) make a sheep sheared if set to true -
getRandomFleeceColor
This method is called when a sheep spawns in the world to select the color of sheep fleece. -
func_90015_b
-
eatGrassBonus
public void eatGrassBonus()This function applies the benefits of growing back wool and faster growing up to the acting entity. (This function is used in the AIEatGrass)- Overrides:
eatGrassBonusin classEntityLiving
-
isAIEnabled
public boolean isAIEnabled()Description copied from class:EntityLivingReturns true if the newer Entity AI code should be run- Overrides:
isAIEnabledin classEntityLiving
-
dropFewItems
protected void dropFewItems(boolean bKilledByPlayer, int iLootingModifier) Description copied from class:EntityLivingDrop 0-2 items of this living's type. @param par1 - Whether this entity has recently been hit by a player. @param par2 - Level of Looting used to kill this mob.- Overrides:
dropFewItemsin classEntityLiving
-
interact
Description copied from class:EntityAgeableCalled when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig.- Overrides:
interactin classEntityAnimal
-
getDropItemId
protected int getDropItemId()Description copied from class:EntityLivingReturns the item ID for the item the mob drops on death.- Overrides:
getDropItemIdin classEntityLiving
-
getCanCreatureTypeBePossessed
public boolean getCanCreatureTypeBePossessed()- Overrides:
getCanCreatureTypeBePossessedin classEntityCreature
-
modSpecificOnLivingUpdate
protected void modSpecificOnLivingUpdate()- Overrides:
modSpecificOnLivingUpdatein classEntityAnimal
-
fall
protected void fall(float par1) Description copied from class:EntityLivingBaseCalled when the mob is falling. Calculates and applies fall damage.- Overrides:
fallin classEntityLivingBase
-
getMountedYOffset
public double getMountedYOffset()Description copied from class:EntityReturns the Y offset from the entity's position for any entity riding this one.- Overrides:
getMountedYOffsetin classEntity
-
isBreedingItem
Description copied from class:EntityAnimalChecks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on the animal type)- Overrides:
isBreedingItemin classEntityAnimal
-
isValidZombieSecondaryTarget
- Overrides:
isValidZombieSecondaryTargetin classEntity
-
onSpawnWithEgg
- Overrides:
onSpawnWithEggin classEntityAnimal
-
createChild
- Specified by:
createChildin classEntityAgeable
-
isSubjectToHunger
public boolean isSubjectToHunger()- Overrides:
isSubjectToHungerin classEntityAnimal
-
getFoodValueMultiplier
public int getFoodValueMultiplier()- Overrides:
getFoodValueMultiplierin classEntityAnimal
-
onBecomeFamished
public void onBecomeFamished()- Overrides:
onBecomeFamishedin classEntityAnimal
-
updateHungerState
public void updateHungerState()- Overrides:
updateHungerStatein classEntityAnimal
-
onDeath
Description copied from class:EntityLivingBaseCalled when the mob's health reaches 0.- Overrides:
onDeathin classEntityAnimal
-
getOriginalFleeceColor
public int getOriginalFleeceColor() -
setOriginalFleeceColor
public void setOriginalFleeceColor(int originalColor) -
setSuperficialFleeceColor
public void setSuperficialFleeceColor(int par1) -
spawnHardcoreBaby
-
blendParentColors
-
getMutantColor
-
isTooHungryToProduceWool
protected boolean isTooHungryToProduceWool() -
handleHealthUpdate
@Environment(CLIENT) public void handleHealthUpdate(byte bUpdateType) - Overrides:
handleHealthUpdatein classEntityAnimal
-
func_70894_j
@Environment(CLIENT) public float func_70894_j(float fPartialTick) -
func_70890_k
@Environment(CLIENT) public float func_70890_k(float fPartialTick) -
onBlockDispenserConsume
public boolean onBlockDispenserConsume(BlockDispenserBlock blockDispenser, BlockDispenserTileEntity tileEntity) Description copied from class:EntityCalled when block dispenser tries to eat this entity, return true if the Dispenser should stop looking for more stuff to consume- Overrides:
onBlockDispenserConsumein classEntity
-