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 class
EntityHorse.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 int
field_110278_bp
int
field_110279_bq
protected boolean
horseJumping
protected float
jumpPower
protected int
temper
-
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 boolean
allowLeashing()
protected void
applyEntityAttributes()
boolean
attackEntityFrom(DamageSource damagesource, float f)
+ Called when the entity is attacked.boolean
canBePushed()
+ Returns true if this entity should push and be pushed by other entities when colliding.boolean
canCarryChest()
+ Return true if the horse entity can carry a chest.boolean
canMateWith(EntityAnimal entityanimal)
+ Returns true if the mob is currently able to mate with the specified mob.boolean
canWearArmor()
+ Return true if the horse entity can wear an armorEntityAgeable
createChild(EntityAgeable entityageable)
void
dropChestItems()
void
dropChests()
protected void
entityInit()
void
fall(float f, float f1)
boolean
func_110239_cn()
boolean
func_110253_bW()
protected void
func_142017_o(float f)
boolean
func_175507_cI()
protected java.lang.String
getAngrySoundName()
boolean
getCanSpawnHere()
+ Checks if the entity's current position is a valid location to spawn this entity.protected EntityHorse
getClosestHorse(Entity entityIn, double distance)
protected java.lang.String
getDeathSound()
+ Returns the sound this mob makes on death.protected Item
getDropItem()
float
getEyeHeight()
float
getGrassEatingAmount(float parFloat1)
boolean
getHasReproduced()
int
getHorseArmorIndexSynced()
+ Returns type of armor from DataWatcher (0 = iron, 1 = gold, 2 = diamond)double
getHorseJumpStrength()
float
getHorseSize()
java.lang.String
getHorseTexture()
int
getHorseType()
+ Returns the horse type.int
getHorseVariant()
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.int
getMaxSpawnedInChunk()
+ Will return how many at most can spawn in a chunk at once.int
getMaxTemper()
float
getMouthOpennessAngle(float parFloat1)
java.lang.String
getName()
+ Gets the name of this command sender (usually username, but possibly "Rcon")java.lang.String
getOwnerId()
+ Gets the horse's ownerfloat
getRearingAmount(float parFloat1)
protected float
getSoundVolume()
+ Returns the volume for the sounds this mob makes.int
getTalkInterval()
+ Get number of ticks, at least during which the living entity will be silent.int
getTemper()
int
getTotalArmorValue()
+ Returns the current armor value as determined by a call to InventoryPlayer.getTotalArmorValuejava.lang.String[]
getVariantTexturePaths()
void
handleStatusUpdate(byte b0)
int
increaseTemper(int parInt1)
boolean
interact(EntityPlayer entityplayer)
+ Called when a player interacts with a mob.boolean
isAdultHorse()
static boolean
isArmorItem(Item parItem)
+ Returns true if given item is horse armorboolean
isBreeding()
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)boolean
isChested()
boolean
isEatingHaystack()
boolean
isHorseJumping()
boolean
isHorseSaddled()
protected boolean
isMovementBlocked()
+ Dead and sleeping entities cannot moveboolean
isOnLadder()
+ returns true if this entity is by a ladder, false otherwiseboolean
isRearing()
boolean
isSterile()
+ Return true if the horse entity is sterile (Undead || Mule)boolean
isTame()
boolean
isUndead()
+ Used to know if the horse can be leashed, if he can mate, or if we can interact with himvoid
makeHorseRearWithSound()
void
moveEntityWithHeading(float f, float f1)
+ Moves the entity based on the specified heading.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.void
onInventoryChanged(InventoryBasic var1)
+ Called by InventoryBasic.onInventoryChanged() on a array that is never filled.void
onLivingUpdate()
+ Called frequently so the entity can update its state every tick as required.void
onUpdate()
+ Called to update the entity's position/logic.void
openGUI(EntityPlayer playerEntity)
protected void
playStepSound(BlockPos blockpos, Block block)
boolean
prepareChunkForSpawn()
void
readEntityFromNBT(NBTTagCompound nbttagcompound)
+ (abstract) Protected helper method to read subclass entity data from NBT.boolean
replaceItemInInventory(int i, ItemStack itemstack)
void
setBreeding(boolean breeding)
void
setChested(boolean chested)
void
setEating(boolean flag)
void
setEatingHaystack(boolean parFlag)
void
setHasReproduced(boolean hasReproducedIn)
void
setHorseArmorStack(ItemStack itemStackIn)
+ Set horse armor stack (for example: new ItemStack(Items.iron_horse_armor))void
setHorseJumping(boolean jumping)
void
setHorseSaddled(boolean saddled)
void
setHorseTamed(boolean tamed)
void
setHorseType(int type)
void
setHorseVariant(int variant)
void
setJumpPower(int jumpPowerIn)
void
setOwnerId(java.lang.String id)
void
setRearing(boolean rearing)
void
setScaleForAge(boolean flag)
+ "Sets the scale for an ageable entity according to the boolean parameter, which says if it's a child."boolean
setTamedBy(EntityPlayer player)
void
setTemper(int temperIn)
protected void
spawnHorseParticles(boolean parFlag)
+ "Spawns particles for the horse entity.void
updateRiderPosition()
void
writeEntityToNBT(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:
entityInit
in 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:
setScaleForAge
in classEntityAgeable
-
isHorseJumping
public boolean isHorseJumping()
-
setHorseTamed
public void setHorseTamed(boolean tamed)
-
setHorseJumping
public void setHorseJumping(boolean jumping)
-
allowLeashing
public boolean allowLeashing()
- Overrides:
allowLeashing
in classEntityLiving
-
func_142017_o
protected void func_142017_o(float f)
- Overrides:
func_142017_o
in 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:
attackEntityFrom
in classEntityAnimal
-
getTotalArmorValue
public int getTotalArmorValue()
+ Returns the current armor value as determined by a call to InventoryPlayer.getTotalArmorValue- Overrides:
getTotalArmorValue
in classEntityLivingBase
-
canBePushed
public boolean canBePushed()
+ Returns true if this entity should push and be pushed by other entities when colliding.- Overrides:
canBePushed
in classEntityLivingBase
-
prepareChunkForSpawn
public boolean prepareChunkForSpawn()
-
dropChests
public void dropChests()
-
fall
public void fall(float f, float f1)
- Overrides:
fall
in classEntityLivingBase
-
onInventoryChanged
public void onInventoryChanged(InventoryBasic var1)
+ Called by InventoryBasic.onInventoryChanged() on a array that is never filled.- Specified by:
onInventoryChanged
in interfaceIInvBasic
-
getCanSpawnHere
public boolean getCanSpawnHere()
+ Checks if the entity's current position is a valid location to spawn this entity.- Overrides:
getCanSpawnHere
in 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:
getDeathSound
in classEntityLivingBase
-
getDropItem
protected Item getDropItem()
- Overrides:
getDropItem
in classEntityLiving
-
getHurtSound
protected java.lang.String getHurtSound()
+ Returns the sound this mob makes when it is hurt.- Overrides:
getHurtSound
in classEntityLivingBase
-
isHorseSaddled
public boolean isHorseSaddled()
-
getLivingSound
protected java.lang.String getLivingSound()
+ Returns the sound this mob makes while it's alive.- Overrides:
getLivingSound
in classEntityLiving
-
getAngrySoundName
protected java.lang.String getAngrySoundName()
-
playStepSound
protected void playStepSound(BlockPos blockpos, Block block)
- Overrides:
playStepSound
in classEntity
-
applyEntityAttributes
protected void applyEntityAttributes()
- Overrides:
applyEntityAttributes
in classEntityLiving
-
getMaxSpawnedInChunk
public int getMaxSpawnedInChunk()
+ Will return how many at most can spawn in a chunk at once.- Overrides:
getMaxSpawnedInChunk
in classEntityLiving
-
getMaxTemper
public int getMaxTemper()
-
getSoundVolume
protected float getSoundVolume()
+ Returns the volume for the sounds this mob makes.- Overrides:
getSoundVolume
in classEntityLivingBase
-
getTalkInterval
public int getTalkInterval()
+ Get number of ticks, at least during which the living entity will be silent.- Overrides:
getTalkInterval
in 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:
interact
in 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:
isMovementBlocked
in 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:
isBreedingItem
in 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:
onLivingUpdate
in classEntityAnimal
-
onUpdate
public void onUpdate()
+ Called to update the entity's position/logic.- Overrides:
onUpdate
in 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:
moveEntityWithHeading
in classEntityLivingBase
-
writeEntityToNBT
public void writeEntityToNBT(NBTTagCompound nbttagcompound)
+ (abstract) Protected helper method to write subclass entity data to NBT.- Overrides:
writeEntityToNBT
in classEntityAnimal
-
readEntityFromNBT
public void readEntityFromNBT(NBTTagCompound nbttagcompound)
+ (abstract) Protected helper method to read subclass entity data from NBT.- Overrides:
readEntityFromNBT
in classEntityAnimal
-
canMateWith
public boolean canMateWith(EntityAnimal entityanimal)
+ Returns true if the mob is currently able to mate with the specified mob.- Overrides:
canMateWith
in classEntityAnimal
-
createChild
public EntityAgeable createChild(EntityAgeable entityageable)
- Specified by:
createChild
in 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:
onInitialSpawn
in 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:
handleStatusUpdate
in classEntityAnimal
-
updateRiderPosition
public void updateRiderPosition()
- Overrides:
updateRiderPosition
in 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:
isOnLadder
in classEntityLivingBase
-
getEyeHeight
public float getEyeHeight()
- Overrides:
getEyeHeight
in classEntity
-
replaceItemInInventory
public boolean replaceItemInInventory(int i, ItemStack itemstack)
- Overrides:
replaceItemInInventory
in classEntityLiving
-
-