Package net.minecraft.entity.passive
Class EntityHorse
- java.lang.Object
-
public class EntityHorse extends EntityAnimal implements IInvBasic
+ This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code. Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!" Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team EaglercraftX 1.8 patch files are (c) 2022-2023 LAX1DUDE. All Rights Reserved. WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR. NOT FOR COMMERCIAL OR MALICIOUS USE (please read the 'LICENSE' file this repo's root directory for more info)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEntityHorse.GroupData-
Nested classes/interfaces inherited from class net.minecraft.entity.EntityLiving
EntityLiving.SpawnPlacementType
-
Nested classes/interfaces inherited from class net.zxmushroom63.plugins.BaseData
BaseData.BooleanCallback, BaseData.BooleanCallbackArr, BaseData.DataBooleanCallback, BaseData.DataBooleanCallbackArr, BaseData.DataDoubleCallback, BaseData.DataDoubleCallbackArr, BaseData.DataFloatCallback, BaseData.DataFloatCallbackArr, BaseData.DataIntCallback, BaseData.DataIntCallbackArr, BaseData.DataObjectCallback, BaseData.DataObjectCallbackArr, BaseData.DataStringCallback, BaseData.DataStringCallbackArr, BaseData.DataVoidCallback, BaseData.DoubleCallback, BaseData.DoubleCallbackArr, BaseData.FloatCallback, BaseData.FloatCallbackArr, BaseData.IntCallback, BaseData.IntCallbackArr, BaseData.ObjectCallback, BaseData.ObjectCallbackArr, BaseData.StringCallback, BaseData.StringCallbackArr, BaseData.VoidCallback
-
-
Field Summary
Fields Modifier and Type Field Description intfield_110278_bpintfield_110279_bqprotected booleanhorseJumpingprotected floatjumpPowerprotected inttemper-
Fields inherited from class net.minecraft.entity.passive.EntityAnimal
spawnableBlock
-
Fields inherited from class net.minecraft.entity.EntityAgeable
field_175502_b, field_175503_c, growingAge
-
Fields inherited from class net.minecraft.entity.EntityCreature
FLEEING_SPEED_MODIFIER, FLEEING_SPEED_MODIFIER_UUID
-
Fields inherited from class net.minecraft.entity.EntityLiving
equipmentDropChances, experienceValue, livingSoundTime
-
Fields inherited from class net.minecraft.entity.EntityLivingBase
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
-
Fields inherited from class net.minecraft.entity.Entity
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 Summary
Constructors Constructor Description EntityHorse(World worldIn)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallowLeashing()protected voidapplyEntityAttributes()booleanattackEntityFrom(DamageSource damagesource, float f)+ Called when the entity is attacked.booleancanBePushed()+ Returns true if this entity should push and be pushed by other entities when colliding.booleancanCarryChest()+ Return true if the horse entity can carry a chest.booleancanMateWith(EntityAnimal entityanimal)+ Returns true if the mob is currently able to mate with the specified mob.booleancanWearArmor()+ Return true if the horse entity can wear an armorEntityAgeablecreateChild(EntityAgeable entityageable)voiddropChestItems()voiddropChests()protected voidentityInit()voidfall(float f, float f1)booleanfunc_110239_cn()booleanfunc_110253_bW()protected voidfunc_142017_o(float f)booleanfunc_175507_cI()protected java.lang.StringgetAngrySoundName()booleangetCanSpawnHere()+ Checks if the entity's current position is a valid location to spawn this entity.protected EntityHorsegetClosestHorse(Entity entityIn, double distance)protected java.lang.StringgetDeathSound()+ Returns the sound this mob makes on death.protected ItemgetDropItem()floatgetEyeHeight()floatgetGrassEatingAmount(float parFloat1)booleangetHasReproduced()intgetHorseArmorIndexSynced()+ Returns type of armor from DataWatcher (0 = iron, 1 = gold, 2 = diamond)doublegetHorseJumpStrength()floatgetHorseSize()java.lang.StringgetHorseTexture()intgetHorseType()+ Returns the horse type.intgetHorseVariant()protected java.lang.StringgetHurtSound()+ Returns the sound this mob makes when it is hurt.protected java.lang.StringgetLivingSound()+ Returns the sound this mob makes while it's alive.intgetMaxSpawnedInChunk()+ Will return how many at most can spawn in a chunk at once.intgetMaxTemper()floatgetMouthOpennessAngle(float parFloat1)java.lang.StringgetName()+ Gets the name of this command sender (usually username, but possibly "Rcon")java.lang.StringgetOwnerId()+ Gets the horse's ownerfloatgetRearingAmount(float parFloat1)protected floatgetSoundVolume()+ Returns the volume for the sounds this mob makes.intgetTalkInterval()+ Get number of ticks, at least during which the living entity will be silent.intgetTemper()intgetTotalArmorValue()+ Returns the current armor value as determined by a call to InventoryPlayer.getTotalArmorValuejava.lang.String[]getVariantTexturePaths()voidhandleStatusUpdate(byte b0)intincreaseTemper(int parInt1)booleaninteract(EntityPlayer entityplayer)+ Called when a player interacts with a mob.booleanisAdultHorse()static booleanisArmorItem(Item parItem)+ Returns true if given item is horse armorbooleanisBreeding()booleanisBreedingItem(ItemStack var1)+ 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)booleanisChested()booleanisEatingHaystack()booleanisHorseJumping()booleanisHorseSaddled()protected booleanisMovementBlocked()+ Dead and sleeping entities cannot movebooleanisOnLadder()+ returns true if this entity is by a ladder, false otherwisebooleanisRearing()booleanisSterile()+ Return true if the horse entity is sterile (Undead || Mule)booleanisTame()booleanisUndead()+ Used to know if the horse can be leashed, if he can mate, or if we can interact with himvoidmakeHorseRearWithSound()voidmoveEntityWithHeading(float f, float f1)+ Moves the entity based on the specified heading.IEntityLivingDataonInitialSpawn(DifficultyInstance difficultyinstance, IEntityLivingData ientitylivingdata)+ 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.voidonInventoryChanged(InventoryBasic var1)+ Called by InventoryBasic.onInventoryChanged() on a array that is never filled.voidonLivingUpdate()+ Called frequently so the entity can update its state every tick as required.voidonUpdate()+ Called to update the entity's position/logic.voidopenGUI(EntityPlayer playerEntity)protected voidplayStepSound(BlockPos blockpos, Block block)booleanprepareChunkForSpawn()voidreadEntityFromNBT(NBTTagCompound nbttagcompound)+ (abstract) Protected helper method to read subclass entity data from NBT.booleanreplaceItemInInventory(int i, ItemStack itemstack)voidsetBreeding(boolean breeding)voidsetChested(boolean chested)voidsetEating(boolean flag)voidsetEatingHaystack(boolean parFlag)voidsetHasReproduced(boolean hasReproducedIn)voidsetHorseArmorStack(ItemStack itemStackIn)+ Set horse armor stack (for example: new ItemStack(Items.iron_horse_armor))voidsetHorseJumping(boolean jumping)voidsetHorseSaddled(boolean saddled)voidsetHorseTamed(boolean tamed)voidsetHorseType(int type)voidsetHorseVariant(int variant)voidsetJumpPower(int jumpPowerIn)voidsetOwnerId(java.lang.String id)voidsetRearing(boolean rearing)voidsetScaleForAge(boolean flag)+ "Sets the scale for an ageable entity according to the boolean parameter, which says if it's a child."booleansetTamedBy(EntityPlayer player)voidsetTemper(int temperIn)protected voidspawnHorseParticles(boolean parFlag)+ "Spawns particles for the horse entity.voidupdateRiderPosition()voidwriteEntityToNBT(NBTTagCompound nbttagcompound)+ (abstract) Protected helper method to write subclass entity data to NBT.-
Methods inherited from class net.minecraft.entity.passive.EntityAnimal
canDespawn, consumeItemFromStack, getBlockPathWeight, getExperiencePoints, getPlayerInLove, isInLove, resetInLove, setInLove, updateAITasks
-
Methods inherited from class net.minecraft.entity.EntityAgeable
addGrowth, func_175501_a, getGrowingAge, isChild, onGrowingAdult, setGrowingAge, setScale, setSize
-
Methods inherited from class net.minecraft.entity.EntityCreature
detachHome, getHomePosition, getMaximumHomeDistance, hasHome, hasPath, isWithinHomeDistanceCurrentPosition, isWithinHomeDistanceFromPosition, setHomePosAndDistance, updateLeashedState
-
Methods inherited from class net.minecraft.entity.EntityLiving
canAttackClass, canBeSteered, canPickUpLoot, clearLeashed, despawnEntity, dropEquipment, dropFewItems, eatGrassBonus, enablePersistence, faceEntity, func_110146_f, func_175448_a, getArmorItemForSlot, getArmorPosition, getAttackTarget, getCurrentArmor, getEquipmentInSlot, getHeldItem, getInventory, getLeashed, getLeashedToEntity, getMaxFallHeight, getRenderSizeModifier, getVerticalFaceSpeed, interactFirst, isAIDisabled, isNoDespawnRequired, isNotColliding, isServerWorld, onEntityUpdate, playLivingSound, setAIMoveSpeed, setAttackTarget, setCanPickUpLoot, setCurrentItemOrArmor, setEnchantmentBasedOnDifficulty, setEquipmentBasedOnDifficulty, setEquipmentDropChance, setLeashedToEntity, setMoveForward, setNoAI, spawnExplosionParticle, updateEntityActionState, updateEquipmentIfNeeded
-
Methods inherited from class net.minecraft.entity.EntityLivingBase
addPotionEffect, addRandomDrop, applyArmorCalculations, applyPotionDamageCalculations, attackEntityAsMob, canBeCollidedWith, canBreatheUnderwater, canDropLoot, canEntityBeSeen, clearActivePotions, collideWithEntity, collideWithNearbyEntities, damageArmor, damageEntity, decreaseAirSupply, dismountEntity, 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, getSwingProgress, getTeam, handleJumpLava, heal, isEntityAlive, isEntityUndead, isOnSameTeam, isOnTeam, isPlayer, isPlayerSleeping, isPotionActive, isPotionActive, isPotionApplicable, jump, kill, knockBack, loadPluginData, makePluginData, markPotionsDirty, mountEntity, 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
-
Methods inherited from class net.minecraft.entity.Entity
addChatMessage, addEntityCrashInfo, addToPlayerScore, addVelocity, applyEnchantments, applyEntityCollision, canAttackWithItem, canCommandSenderUseCommand, canRenderOnFire, canTriggerWalking, clientUpdateEntityNBT, copyDataFromOld, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, doBlockCollisions, doesEntityNotTriggerPressurePlate, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, fromNBT, func_181012_aH, func_181014_aG, func_181015_d, getAir, getAlwaysRenderNameTag, getBrightness, getBrightnessForRender, getCollisionBorderSize, getCollisionBoundingBox, getCollisionBox, getCommandSenderEntity, getCustomNameTag, getDataWatcher, getDisplayName, getDistance, getDistanceSq, getDistanceSq, getDistanceSqToCenter, getDistanceSqToEntity, getDistanceToEntity, getEntityBoundingBox, getEntityId, getEntityString, getEntityWorld, getExplosionResistance, getFlag, getHorizontalFacing, getHoverEvent, getMaxInPortalTime, getMountedYOffset, 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, isSprinting, isWet, moveEntity, moveFlying, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, onChunkLoad, onCollideWithPlayer, onDataWatcherUpdate, onKillEntity, onStruckByLightning, playSound, preparePlayerToSpawn, pushOutOfBlocks, rayTrace, readFromNBT, resetHeight, sendCommandFeedback, setAir, setAlwaysRenderNameTag, setAngles, setCustomNameTag, setDead, setEntityBoundingBox, setEntityId, setFire, setFlag, setInvisible, setInWeb, setLocationAndAngles, setOnFireFromLava, setOutsideBorder, setPosition, setPositionAndRotation, setPositionAndUpdate, setRotation, setSilent, setSneaking, setVelocity, setWorld, shouldSetPosAfterLoading, spawnRunningParticles, toNBT, toString, travelToDimension, verifyExplosion, writeMountToNBT, writeToNBT, writeToNBTOptional
-
Methods inherited from class net.zxmushroom63.plugins.BaseData
execFuncBaseData, execFuncObject, execFuncString, getBaseData, getBaseDataArr, getBoolean, getBooleanArr, getByte, getByteArr, getChar, getCharArr, getDouble, getDoubleArr, getFloat, getFloatArr, getInt, getIntArr, getObject, getObjectArr, getShort, getShortArr, getString, getStringArr, has, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, setCallbackBoolean, setCallbackBooleanArr, setCallbackBooleanArrWithDataArg, setCallbackBooleanWithDataArg, setCallbackDouble, setCallbackDoubleArr, setCallbackDoubleArrWithDataArg, setCallbackDoubleWithDataArg, setCallbackFloat, setCallbackFloatArr, setCallbackFloatArrWithDataArg, setCallbackFloatWithDataArg, setCallbackInt, setCallbackIntArr, setCallbackIntArrWithDataArg, setCallbackIntWithDataArg, setCallbackObject, setCallbackObjectArr, setCallbackObjectArrWithDataArg, setCallbackObjectWithDataArg, setCallbackString, setCallbackStringArr, setCallbackStringArrWithDataArg, setCallbackStringWithDataArg, setCallbackVoid, setCallbackVoidWithDataArg, setNull
-
-
-
-
Constructor Detail
-
EntityHorse
public EntityHorse(World worldIn)
-
-
Method Detail
-
entityInit
protected void entityInit()
- Overrides:
entityInitin classEntityAgeable
-
setHorseType
public void setHorseType(int type)
-
getHorseType
public int getHorseType()
+ Returns the horse type. 0 = Normal, 1 = Donkey, 2 = Mule, 3 = Undead Horse, 4 = Skeleton Horse
-
setHorseVariant
public void setHorseVariant(int variant)
-
getHorseVariant
public int getHorseVariant()
-
getName
public java.lang.String getName()
+ Gets the name of this command sender (usually username, but possibly "Rcon")
-
isAdultHorse
public boolean isAdultHorse()
-
isTame
public boolean isTame()
-
func_110253_bW
public boolean func_110253_bW()
-
getOwnerId
public java.lang.String getOwnerId()
+ Gets the horse's owner
-
setOwnerId
public void setOwnerId(java.lang.String id)
-
getHorseSize
public float getHorseSize()
-
setScaleForAge
public void setScaleForAge(boolean flag)
+ "Sets the scale for an ageable entity according to the boolean parameter, which says if it's a child."- Overrides:
setScaleForAgein classEntityAgeable
-
isHorseJumping
public boolean isHorseJumping()
-
setHorseTamed
public void setHorseTamed(boolean tamed)
-
setHorseJumping
public void setHorseJumping(boolean jumping)
-
allowLeashing
public boolean allowLeashing()
- Overrides:
allowLeashingin classEntityLiving
-
func_142017_o
protected void func_142017_o(float f)
- Overrides:
func_142017_oin classEntityCreature
-
isChested
public boolean isChested()
-
getHorseArmorIndexSynced
public int getHorseArmorIndexSynced()
+ Returns type of armor from DataWatcher (0 = iron, 1 = gold, 2 = diamond)
-
isEatingHaystack
public boolean isEatingHaystack()
-
isRearing
public boolean isRearing()
-
isBreeding
public boolean isBreeding()
-
getHasReproduced
public boolean getHasReproduced()
-
setHorseArmorStack
public void setHorseArmorStack(ItemStack itemStackIn)
+ Set horse armor stack (for example: new ItemStack(Items.iron_horse_armor))
-
setBreeding
public void setBreeding(boolean breeding)
-
setChested
public void setChested(boolean chested)
-
setHasReproduced
public void setHasReproduced(boolean hasReproducedIn)
-
setHorseSaddled
public void setHorseSaddled(boolean saddled)
-
getTemper
public int getTemper()
-
setTemper
public void setTemper(int temperIn)
-
increaseTemper
public int increaseTemper(int parInt1)
-
attackEntityFrom
public boolean attackEntityFrom(DamageSource damagesource, float f)
+ Called when the entity is attacked.- Overrides:
attackEntityFromin classEntityAnimal
-
getTotalArmorValue
public int getTotalArmorValue()
+ Returns the current armor value as determined by a call to InventoryPlayer.getTotalArmorValue- Overrides:
getTotalArmorValuein classEntityLivingBase
-
canBePushed
public boolean canBePushed()
+ Returns true if this entity should push and be pushed by other entities when colliding.- Overrides:
canBePushedin classEntityLivingBase
-
prepareChunkForSpawn
public boolean prepareChunkForSpawn()
-
dropChests
public void dropChests()
-
fall
public void fall(float f, float f1)- Overrides:
fallin classEntityLivingBase
-
onInventoryChanged
public void onInventoryChanged(InventoryBasic var1)
+ Called by InventoryBasic.onInventoryChanged() on a array that is never filled.- Specified by:
onInventoryChangedin interfaceIInvBasic
-
getCanSpawnHere
public boolean getCanSpawnHere()
+ Checks if the entity's current position is a valid location to spawn this entity.- Overrides:
getCanSpawnHerein classEntityAnimal
-
getClosestHorse
protected EntityHorse getClosestHorse(Entity entityIn, double distance)
-
getHorseJumpStrength
public double getHorseJumpStrength()
-
getDeathSound
protected java.lang.String getDeathSound()
+ Returns the sound this mob makes on death.- Overrides:
getDeathSoundin classEntityLivingBase
-
getDropItem
protected Item getDropItem()
- Overrides:
getDropItemin classEntityLiving
-
getHurtSound
protected java.lang.String getHurtSound()
+ Returns the sound this mob makes when it is hurt.- Overrides:
getHurtSoundin classEntityLivingBase
-
isHorseSaddled
public boolean isHorseSaddled()
-
getLivingSound
protected java.lang.String getLivingSound()
+ Returns the sound this mob makes while it's alive.- Overrides:
getLivingSoundin classEntityLiving
-
getAngrySoundName
protected java.lang.String getAngrySoundName()
-
playStepSound
protected void playStepSound(BlockPos blockpos, Block block)
- Overrides:
playStepSoundin classEntity
-
applyEntityAttributes
protected void applyEntityAttributes()
- Overrides:
applyEntityAttributesin classEntityLiving
-
getMaxSpawnedInChunk
public int getMaxSpawnedInChunk()
+ Will return how many at most can spawn in a chunk at once.- Overrides:
getMaxSpawnedInChunkin classEntityLiving
-
getMaxTemper
public int getMaxTemper()
-
getSoundVolume
protected float getSoundVolume()
+ Returns the volume for the sounds this mob makes.- Overrides:
getSoundVolumein classEntityLivingBase
-
getTalkInterval
public int getTalkInterval()
+ Get number of ticks, at least during which the living entity will be silent.- Overrides:
getTalkIntervalin classEntityAnimal
-
func_110239_cn
public boolean func_110239_cn()
-
func_175507_cI
public boolean func_175507_cI()
-
getHorseTexture
public java.lang.String getHorseTexture()
-
getVariantTexturePaths
public java.lang.String[] getVariantTexturePaths()
-
openGUI
public void openGUI(EntityPlayer playerEntity)
-
interact
public boolean interact(EntityPlayer entityplayer)
+ Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig.- Overrides:
interactin classEntityAnimal
-
canWearArmor
public boolean canWearArmor()
+ Return true if the horse entity can wear an armor
-
canCarryChest
public boolean canCarryChest()
+ Return true if the horse entity can carry a chest.
-
isMovementBlocked
protected boolean isMovementBlocked()
+ Dead and sleeping entities cannot move- Overrides:
isMovementBlockedin classEntityLivingBase
-
isUndead
public boolean isUndead()
+ Used to know if the horse can be leashed, if he can mate, or if we can interact with him
-
isSterile
public boolean isSterile()
+ Return true if the horse entity is sterile (Undead || Mule)
-
isBreedingItem
public boolean isBreedingItem(ItemStack var1)
+ 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)- Overrides:
isBreedingItemin classEntityAnimal
-
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
-
onUpdate
public void onUpdate()
+ Called to update the entity's position/logic.- Overrides:
onUpdatein classEntityLivingBase
-
setEatingHaystack
public void setEatingHaystack(boolean parFlag)
-
setRearing
public void setRearing(boolean rearing)
-
makeHorseRearWithSound
public void makeHorseRearWithSound()
-
dropChestItems
public void dropChestItems()
-
setTamedBy
public boolean setTamedBy(EntityPlayer player)
-
moveEntityWithHeading
public void moveEntityWithHeading(float f, float f1)+ Moves the entity based on the specified heading. Args: strafe, forward- Overrides:
moveEntityWithHeadingin classEntityLivingBase
-
writeEntityToNBT
public void writeEntityToNBT(NBTTagCompound nbttagcompound)
+ (abstract) Protected helper method to write subclass entity data to NBT.- Overrides:
writeEntityToNBTin classEntityAnimal
-
readEntityFromNBT
public void readEntityFromNBT(NBTTagCompound nbttagcompound)
+ (abstract) Protected helper method to read subclass entity data from NBT.- Overrides:
readEntityFromNBTin classEntityAnimal
-
canMateWith
public boolean canMateWith(EntityAnimal entityanimal)
+ Returns true if the mob is currently able to mate with the specified mob.- Overrides:
canMateWithin classEntityAnimal
-
createChild
public EntityAgeable createChild(EntityAgeable entityageable)
- Specified by:
createChildin classEntityAgeable
-
onInitialSpawn
public IEntityLivingData onInitialSpawn(DifficultyInstance difficultyinstance, IEntityLivingData ientitylivingdata)
+ 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. Mainly used for initializing attributes and inventory- Overrides:
onInitialSpawnin classEntityLiving
-
getGrassEatingAmount
public float getGrassEatingAmount(float parFloat1)
-
getRearingAmount
public float getRearingAmount(float parFloat1)
-
getMouthOpennessAngle
public float getMouthOpennessAngle(float parFloat1)
-
setJumpPower
public void setJumpPower(int jumpPowerIn)
-
spawnHorseParticles
protected void spawnHorseParticles(boolean parFlag)
+ "Spawns particles for the horse entity. par1 tells whether to spawn hearts. If it is false, it spawns smoke."
-
handleStatusUpdate
public void handleStatusUpdate(byte b0)
- Overrides:
handleStatusUpdatein classEntityAnimal
-
updateRiderPosition
public void updateRiderPosition()
- Overrides:
updateRiderPositionin classEntity
-
isArmorItem
public static boolean isArmorItem(Item parItem)
+ Returns true if given item is horse armor
-
isOnLadder
public boolean isOnLadder()
+ returns true if this entity is by a ladder, false otherwise- Overrides:
isOnLadderin classEntityLivingBase
-
getEyeHeight
public float getEyeHeight()
- Overrides:
getEyeHeightin classEntity
-
replaceItemInInventory
public boolean replaceItemInInventory(int i, ItemStack itemstack)- Overrides:
replaceItemInInventoryin classEntityLiving
-
-