public abstract class HorseBaseEntity extends AnimalEntity implements InventoryChangedListener, JumpingMount, Saddleable
PassiveEntity.PassiveDataEntity.PositionUpdater| Modifier and Type | Field and Description |
|---|---|
private float |
angryAnimationProgress |
private int |
angryTicks |
private float |
eatingAnimationProgress |
private float |
eatingGrassAnimationProgress |
private int |
eatingGrassTicks |
private int |
eatingTicks |
int |
field_6957 |
int |
field_6958 |
protected boolean |
field_6964 |
private static TrackedData<Byte> |
HORSE_FLAGS |
protected boolean |
inAir |
private static Predicate<LivingEntity> |
IS_BRED_HORSE |
protected BasicInventory |
items |
private boolean |
jumping |
protected float |
jumpStrength |
private float |
lastAngryAnimationProgress |
private float |
lastEatingAnimationProgress |
private float |
lastEatingGrassAnimationProgress |
private static TrackedData<Optional<UUID>> |
OWNER_UUID |
private static TargetPredicate |
PARENT_HORSE_PREDICATE |
protected int |
soundTicks |
protected int |
temper |
breedingAge, forcedAge, happyTicksRemainingambientSoundChance, armorDropChances, experiencePoints, goalSelector, handDropChances, jumpControl, lookControl, moveControl, navigation, targetSelectoractiveItemStack, attackingPlayer, bodyTrackingIncrements, bodyYaw, brain, dead, deathTime, defaultMaximumHealth, despawnCounter, field_20347, field_6215, flyingSpeed, forwardSpeed, handSwinging, handSwingProgress, handSwingTicks, headTrackingIncrements, headYaw, hurtTime, itemUseTimeLeft, knockbackVelocity, lastAttackedTicks, lastDamageTaken, lastHandSwingProgress, lastLimbDistance, limbAngle, limbDistance, LIVING_FLAGS, lookDirection, maxHurtTime, playerHitTimer, preferredHand, prevBodyYaw, prevHeadYaw, prevLookDirection, prevStepBobbingAmount, pushCooldown, randomLargeSeed, randomSmallSeed, roll, scoreAmount, serverHeadYaw, serverPitch, serverX, serverY, serverYaw, serverZ, sidewaysSpeed, SLEEPING_DIMENSIONS, stepBobbingAmount, stuckArrowTimer, upwardSpeedage, chunkX, chunkY, chunkZ, dataTracker, dimension, distanceTraveled, fallDistance, firstUpdate, FLAGS, glowing, horizontalCollision, horizontalSpeed, ignoreCameraFrustum, inanimate, inLava, inNetherPortal, lastNetherPortalDirection, lastNetherPortalDirectionVector, lastNetherPortalPosition, lastRenderX, lastRenderY, lastRenderZ, LOGGER, movementMultiplier, netherPortalCooldown, netherPortalTime, noClip, onGround, pitch, POSE, prevHorizontalSpeed, prevPitch, prevX, prevY, prevYaw, prevZ, pushSpeedReduction, random, removed, ridingCooldown, stepHeight, submergedInWater, teleporting, timeUntilRegen, touchingWater, trackedX, trackedY, trackedZ, updateNeeded, uuid, uuidString, velocityDirty, velocityModified, verticalCollision, waterHeight, world, yawDUMMY| Modifier | Constructor and Description |
|---|---|
protected |
HorseBaseEntity(EntityType<? extends HorseBaseEntity> type,
World world) |
| Modifier and Type | Method and Description |
|---|---|
int |
addTemper(int difference) |
boolean |
bondWithPlayer(PlayerEntity player) |
boolean |
canBeControlledByRider() |
boolean |
canBeSaddled() |
protected boolean |
canBreed() |
boolean |
canBreedWith(AnimalEntity other) |
boolean |
canEquip() |
boolean |
canEquip(ItemStack item) |
boolean |
canJump() |
protected int |
computeFallDamage(float fallDistance,
float damageMultiplier) |
static DefaultAttributeContainer.Builder |
createBaseHorseAttributes() |
PassiveEntity |
createChild(PassiveEntity mate) |
protected void |
dropInventory() |
boolean |
eatsGrass() |
boolean |
equip(int slot,
ItemStack item) |
protected float |
getActiveEyeHeight(EntityPose pose,
EntityDimensions dimensions) |
protected SoundEvent |
getAmbientSound() |
float |
getAngryAnimationProgress(float tickDelta) |
protected SoundEvent |
getAngrySound() |
protected float |
getChildHealthBonus() |
protected double |
getChildJumpStrengthBonus() |
protected double |
getChildMovementSpeedBonus() |
protected SoundEvent |
getDeathSound() |
float |
getEatingAnimationProgress(float tickDelta) |
float |
getEatingGrassAnimationProgress(float tickDelta) |
protected boolean |
getHorseFlag(int bitmask) |
protected SoundEvent |
getHurtSound(DamageSource source) |
protected int |
getInventorySize() |
double |
getJumpStrength() |
int |
getLimitPerChunk() |
int |
getMaxTemper() |
int |
getMinAmbientSoundDelay() |
UUID |
getOwnerUuid() |
Entity |
getPrimaryPassenger() |
protected float |
getSoundVolume() |
int |
getTemper() |
boolean |
handleFallDamage(float fallDistance,
float damageMultiplier) |
void |
handleStatus(byte status) |
protected void |
initAttributes() |
protected void |
initCustomGoals() |
protected void |
initDataTracker() |
protected void |
initGoals() |
EntityData |
initialize(IWorld world,
LocalDifficulty difficulty,
SpawnType spawnType,
EntityData entityData,
CompoundTag entityTag) |
boolean |
isAngry() |
boolean |
isBred() |
boolean |
isBreedingItem(ItemStack stack) |
boolean |
isClimbing() |
boolean |
isEatingGrass() |
protected boolean |
isImmobile() |
boolean |
isInAir() |
boolean |
isPushable() |
boolean |
isSaddled() |
boolean |
isTame() |
Vec3d |
method_24829(LivingEntity livingEntity) |
protected void |
method_6721() |
private void |
method_6759() |
void |
onInventoryChanged(Inventory sender) |
void |
openInventory(PlayerEntity player) |
void |
playAngrySound() |
private void |
playEatingAnimation() |
protected void |
playJumpSound() |
protected void |
playStepSound(BlockPos pos,
BlockState state) |
protected void |
playWalkSound(BlockSoundGroup group) |
protected void |
putPlayerOnBack(PlayerEntity player) |
void |
readCustomDataFromTag(CompoundTag tag) |
protected boolean |
receiveFood(PlayerEntity player,
ItemStack item) |
void |
saddle(SoundCategory sound) |
void |
setAngry(boolean angry) |
void |
setBred(boolean bred) |
protected void |
setChildAttributes(PassiveEntity mate,
HorseBaseEntity child) |
private void |
setEating() |
void |
setEatingGrass(boolean eatingGrass) |
protected void |
setHorseFlag(int bitmask,
boolean flag) |
void |
setInAir(boolean inAir) |
void |
setJumpStrength(int strength) |
void |
setOwnerUuid(UUID uuid) |
boolean |
setSaddled() |
void |
setTame(boolean tame) |
void |
setTemper(int temper) |
protected void |
spawnPlayerReactionParticles(boolean positive) |
void |
startJumping(int height) |
void |
stopJumping() |
void |
tick() |
void |
tickMovement() |
void |
travel(Vec3d movementInput) |
private void |
updateAnger() |
protected void |
updateForLeashLength(float leashLength) |
void |
updatePassengerPosition(Entity passenger) |
protected void |
updateSaddle() |
protected void |
walkToParent() |
void |
writeCustomDataToTag(CompoundTag tag) |
breed, canEat, canImmediatelyDespawn, damage, eat, getCurrentExperience, getHeightOffset, getLovingPlayer, getPathfindingFavor, interactMob, isInLove, isValidNaturalSpawn, lovePlayer, mobTick, resetLoveTicks, setLoveTicksgetBreedingAge, growUp, growUp, isBaby, isReadyToBreed, onGrowUp, onTrackedDataSet, setBaby, setBreedingAgecanSpawn, getPathfindingFavor, getRunFromLeashSpeed, isNavigating, updateLeashattachLeash, baseTick, canBeLeashedBy, canEquipmentSlotContain, canGather, canMobSpawn, canMoveVoluntarily, cannotDespawn, canPickUp, canPickupItem, canPickUpLoot, canSpawn, canTarget, canTarget, checkDespawn, createBodyControl, createMobAttributes, createNavigation, detachLeash, dropEquipment, dropLoot, equipLootStack, equipStack, getArmorItems, getBodyYawSpeed, getDropChance, getEquipmentForSlot, getEquippedStack, getHoldingEntity, getItemsHand, getJumpControl, getLookControl, getLookPitchSpeed, getLookYawSpeed, getLootContextBuilder, getLootTable, getLootTableId, getMainArm, getMoveControl, getNavigation, getPathfindingPenalty, getPositionTarget, getPositionTargetRange, getPreferredEquipmentSlot, getSafeFallDistance, getTarget, getVisibilityCache, hasPositionTarget, initEquipment, interact, isAiDisabled, isAttacking, isBetterItemFor, isDisallowedInPeaceful, isInDaylight, isInWalkTargetRange, isInWalkTargetRange, isLeashed, isLeftHanded, isLogicalSideForUpdatingMovement, isPersistent, lookAtEntity, loot, method_20417, method_25938, method_25939, movesIndependently, onEatingGrass, onPlayerSpawnedChild, playAmbientSound, playHurtSound, playSpawnEffects, sendAiDebugData, setAiDisabled, setAttacking, setCanPickUpLoot, setEquipmentDropChance, setForwardSpeed, setHoldingEntityId, setLeftHanded, setMovementSpeed, setPathfindingPenalty, setPersistent, setPositionTarget, setSidewaysSpeed, setTarget, setUpwardSpeed, spawnsTooManyForEachTry, startRiding, swimUpward, tickNewAi, tryAttack, tryEquip, turnHead, updateEnchantmentsaddStatusEffect, animateDamage, applyArmorToDamage, applyDamage, applyEnchantmentsToDamage, applyFrostWalker, attackLivingEntity, attemptSprintingParticles, canBeRiddenInWater, canBreatheInWater, canDropLootAndXp, canHaveStatusEffect, canSee, canWalkOnLava, clearActiveItem, clearPotionSwirls, clearSleepingPosition, clearStatusEffects, collides, consumeItem, containsOnlyAmbientEffects, createLivingAttributes, createSpawnPacket, damageArmor, damageShield, deserializeBrain, destroy, drop, dropXp, eatFood, endCombat, enterCombat, fall, getAbsorptionAmount, getActiveHand, getActiveItem, getActiveStatusEffects, getArmor, getArmorVisibility, getArrowType, getAttackDistanceScalingFactor, getAttacker, getAttacking, getAttribute, getAttributeInstance, getAttributes, getBaseMovementSpeedMultiplier, getBlockState, getBrain, getDamageTracker, getDespawnCounter, getDimensions, getDrinkSound, getEatSound, getEyeHeight, getFallSound, getGroup, getHandSwingProgress, getHeadYaw, getHealth, getItemUseTime, getItemUseTimeLeft, getJumpVelocity, getLastAttackedTime, getLastAttackTime, getLeaningPitch, getMainHandStack, getMaximumHealth, getMovementSpeed, getNextAirOnLand, getNextAirUnderwater, getOffHandStack, getPoses, getPrimeAdversary, getRandom, getRecentDamageSource, getRoll, getScaleFactor, getSleepingDirection, getSleepingPosition, getSoundPitch, getStackInHand, getStatusEffect, getStatusEffects, getStingerCount, getStuckArrowCount, getVelocityMultiplier, getYaw, hasStackEquipped, hasStatusEffect, heal, isAffectedBySplashPotions, isAlive, isBlocking, isFallFlying, isHolding, isHolding, isHoldingOntoLadder, isInsideWall, isInSwimmingPose, isMobOrPlayer, isSleeping, isTarget, isUndead, isUsingItem, isUsingRiptide, jump, kill, knockback, knockDownwards, lookAt, markEffectsDirty, method_24832, method_24833, method_25937, method_26081, method_26082, method_26317, method_26318, method_26826, method_27071, onAttacking, onDeath, onEquipStack, onKilledBy, onStatusEffectApplied, onStatusEffectRemoved, onStatusEffectUpgraded, playBlockFallSound, push, pushAway, pushAwayFrom, removeStatusEffect, removeStatusEffectInternal, scheduleVelocityUpdate, sendEquipmentBreakStatus, sendPickup, sendToolBreakStatus, setAbsorptionAmount, setAttacker, setCurrentHand, setDespawnCounter, setHeadYaw, setHealth, setJumping, setLivingFlag, setNearbySongPlaying, setOnGround, setPushCooldown, setSleepingPosition, setSprinting, setStackInHand, setStingerCount, setStuckArrowCount, setYaw, shouldAlwaysDropXp, shouldRenderName, sleep, spawnConsumptionEffects, stopRiding, stopUsingItem, swingHand, swingHand, takeKnockback, takeShieldHit, teleport, tickCramming, tickHandSwing, tickRiding, tickStatusEffects, updatePostDeath, updatePotionVisibility, updateTrackedHeadRotation, updateTrackedPositionAndAngles, wakeUpaddPassenger, addScoreboardTag, addVelocity, adjustMovementForCollisions, adjustMovementForCollisions, adjustMovementForPiston, adjustMovementForSneaking, adjustSingleAxisMovementForCollisions, afterSpawn, applyMirror, applyRotation, bypassesLandingEffects, bypassesSteppingEffects, calculateBoundsForPose, calculateDimensions, calculateNextStepSoundDistance, canAddPassenger, canAvoidTraps, canBeSpectated, canClimb, canExplosionDestroyBlock, canFly, canStartRiding, canUsePortals, changeDimension, changeLookDirection, checkBlockCollision, copyFrom, copyPositionAndRotation, dealDamage, detach, distanceTo, doesNotCollide, doesRenderOnFire, dropItem, dropItem, dropStack, dropStack, entityDataRequiresOperator, equals, extinguish, fromTag, getAir, getBlockPos, getBodyY, getBoundingBox, getBrightnessAtEyes, getBurningDuration, getCameraPosVec, getCollisionBox, getCommandSource, getCustomName, getDataTracker, getDefaultName, getDefaultNetherPortalCooldown, getDisplayName, getEffectiveExplosionResistance, getEntityId, getEntityName, getEntityWorld, getEyeHeight, getEyeY, getFireTicks, getFlag, getHardCollisionBox, getHeight, getHighSpeedSplashSound, getHorizontalFacing, getHoverEvent, getItemsEquipped, getJumpVelocityMultiplier, getLandingBlockState, getLandingPos, getLastNetherPortalDirection, getLastNetherPortalDirectionVector, getMaxAir, getMaxNetherPortalTime, getMountedHeightOffset, getMovementDirection, getName, getOppositeRotationVector, getOppositeRotationVector, getParticleX, getParticleZ, getPassengerList, getPassengersDeep, getPermissionLevel, getPistonBehavior, getPitch, getPos, getPose, getRandomBodyY, getRenderDistanceMultiplier, getRootVehicle, getRotationClient, getRotationVec, getRotationVecClient, getRotationVector, getRotationVector, getSavedEntityId, getScoreboardTags, getScoreboardTeam, getServer, getSoundCategory, getSplashSound, getStandingEyeHeight, getSwimSound, getTargetingMargin, getTeamColorValue, getType, getUuid, getUuidAsString, getVehicle, getVelocity, getVelocityAffectingPos, getVisibilityBoundingBox, getWaterHeight, getWidth, getX, getY, getZ, handleAttack, hasCustomName, hashCode, hasNoGravity, hasPassenger, hasPassengerDeep, hasPassengers, hasPassengerType, hasPermissionLevel, hasPlayerRider, hasVehicle, hasWings, interactAt, isAttackable, isConnectedThroughVehicle, isCustomNameVisible, isDescending, isFireImmune, isGlowing, isImmuneToExplosion, isInLava, isInRange, isInsideWaterOrBubbleColumn, isInSneakingPose, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isLiving, isOnFire, isOnGround, isPartOf, isSilent, isSneaking, isSneaky, isSpectator, isSprinting, isSubmergedIn, isSubmergedIn, isSubmergedInWater, isSwimming, isTeammate, isTeamPlayer, isTouchingWater, isTouchingWaterOrRain, isWet, method_24826, move, moveToBoundingBoxCenter, offsetX, offsetZ, onBlockCollision, onBubbleColumnCollision, onBubbleColumnSurfaceCollision, onKilledOther, onPassengerLookAround, onPlayerCollision, onStartedTrackingBy, onStoppedTrackingBy, onStruckByLightning, onSwimmingStart, playFlySound, playSound, playSwimSound, populateCrashReport, positAfterTeleport, pushOutOfBlocks, rayTrace, refreshPosition, refreshPositionAndAngles, refreshPositionAndAngles, remove, removeAllPassengers, removePassenger, removeScoreboardTag, requestTeleport, resetPosition, saveSelfToTag, saveToTag, sendSystemMessage, setAir, setBoundingBox, setCustomName, setCustomNameVisible, setEntityId, setFireTicks, setFlag, setGlowing, setInLava, setInNetherPortal, setInvisible, setInvulnerable, setNoGravity, setOnFireFor, setOnFireFromLava, setPos, setPose, setRenderDistanceMultiplier, setRotation, setSilent, setSneaking, setSwimming, setUuid, setVelocity, setVelocity, setVelocityClient, setWorld, shouldBroadcastConsoleToOps, shouldLeaveSwimmingPose, shouldReceiveFeedback, shouldRender, shouldRender, shouldSetPositionOnLoad, shouldTrackOutput, slowMovement, spawnSprintingParticles, squaredDistanceTo, squaredDistanceTo, squaredDistanceTo, squaredHorizontalLength, startRiding, streamPassengersRecursively, teleport, teleportRequested, tickNetherPortal, tickNetherPortalCooldown, toListTag, toListTag, toString, toTag, updateKilledAdvancementCriterion, updateMovementInFluid, updatePassengerPosition, updatePosition, updatePositionAndAngles, updatePositionsRecursively, updateSwimming, updateTrackedPosition, updateVelocity, updateWaterState, wouldPoseNotCollideprivate static final Predicate<LivingEntity> IS_BRED_HORSE
private static final TargetPredicate PARENT_HORSE_PREDICATE
private static final TrackedData<Byte> HORSE_FLAGS
private static final TrackedData<Optional<UUID>> OWNER_UUID
private int eatingGrassTicks
private int eatingTicks
private int angryTicks
public int field_6957
public int field_6958
protected boolean inAir
protected BasicInventory items
protected int temper
protected float jumpStrength
private boolean jumping
private float eatingGrassAnimationProgress
private float lastEatingGrassAnimationProgress
private float angryAnimationProgress
private float lastAngryAnimationProgress
private float eatingAnimationProgress
private float lastEatingAnimationProgress
protected boolean field_6964
protected int soundTicks
protected HorseBaseEntity(EntityType<? extends HorseBaseEntity> type, World world)
protected void initCustomGoals()
protected void initDataTracker()
initDataTracker in class PassiveEntityprotected boolean getHorseFlag(int bitmask)
protected void setHorseFlag(int bitmask,
boolean flag)
public boolean isTame()
public boolean isInAir()
public void setTame(boolean tame)
public void setInAir(boolean inAir)
protected void updateForLeashLength(float leashLength)
updateForLeashLength in class MobEntityWithAipublic boolean isEatingGrass()
public boolean isAngry()
public boolean isBred()
public void setBred(boolean bred)
public boolean canBeSaddled()
canBeSaddled in interface Saddleablepublic void saddle(@Nullable SoundCategory sound)
saddle in interface Saddleablepublic boolean isSaddled()
isSaddled in interface Saddleablepublic int getTemper()
public void setTemper(int temper)
public int addTemper(int difference)
public boolean isPushable()
isPushable in class LivingEntityprivate void playEatingAnimation()
public boolean handleFallDamage(float fallDistance,
float damageMultiplier)
handleFallDamage in class LivingEntityprotected int computeFallDamage(float fallDistance,
float damageMultiplier)
computeFallDamage in class LivingEntityprotected int getInventorySize()
protected void method_6721()
protected void updateSaddle()
public void onInventoryChanged(Inventory sender)
onInventoryChanged in interface InventoryChangedListenerpublic double getJumpStrength()
@Nullable protected SoundEvent getDeathSound()
getDeathSound in class LivingEntity@Nullable protected SoundEvent getHurtSound(DamageSource source)
getHurtSound in class LivingEntity@Nullable protected SoundEvent getAmbientSound()
getAmbientSound in class MobEntity@Nullable protected SoundEvent getAngrySound()
protected void playStepSound(BlockPos pos, BlockState state)
playStepSound in class Entityprotected void playWalkSound(BlockSoundGroup group)
public static DefaultAttributeContainer.Builder createBaseHorseAttributes()
public int getLimitPerChunk()
getLimitPerChunk in class MobEntitypublic int getMaxTemper()
protected float getSoundVolume()
getSoundVolume in class LivingEntitypublic int getMinAmbientSoundDelay()
getMinAmbientSoundDelay in class AnimalEntitypublic void openInventory(PlayerEntity player)
protected boolean receiveFood(PlayerEntity player, ItemStack item)
protected void putPlayerOnBack(PlayerEntity player)
protected boolean isImmobile()
isImmobile in class LivingEntitypublic boolean isBreedingItem(ItemStack stack)
isBreedingItem in class AnimalEntityprivate void method_6759()
protected void dropInventory()
dropInventory in class LivingEntitypublic void tickMovement()
tickMovement in class AnimalEntityprotected void walkToParent()
public boolean eatsGrass()
private void setEating()
public void setEatingGrass(boolean eatingGrass)
public void setAngry(boolean angry)
private void updateAnger()
public void playAngrySound()
public boolean bondWithPlayer(PlayerEntity player)
public void travel(Vec3d movementInput)
travel in class LivingEntityprotected void playJumpSound()
public void writeCustomDataToTag(CompoundTag tag)
writeCustomDataToTag in class AnimalEntitypublic void readCustomDataFromTag(CompoundTag tag)
readCustomDataFromTag in class AnimalEntitypublic boolean canBreedWith(AnimalEntity other)
canBreedWith in class AnimalEntityprotected boolean canBreed()
@Nullable public PassiveEntity createChild(PassiveEntity mate)
createChild in class PassiveEntityprotected void setChildAttributes(PassiveEntity mate, HorseBaseEntity child)
public boolean canBeControlledByRider()
canBeControlledByRider in class MobEntity@Environment(value=CLIENT) public float getEatingGrassAnimationProgress(float tickDelta)
@Environment(value=CLIENT) public float getAngryAnimationProgress(float tickDelta)
@Environment(value=CLIENT) public float getEatingAnimationProgress(float tickDelta)
@Environment(value=CLIENT) public void setJumpStrength(int strength)
setJumpStrength in interface JumpingMountpublic boolean canJump()
canJump in interface JumpingMountpublic void startJumping(int height)
startJumping in interface JumpingMountpublic void stopJumping()
stopJumping in interface JumpingMount@Environment(value=CLIENT) protected void spawnPlayerReactionParticles(boolean positive)
@Environment(value=CLIENT) public void handleStatus(byte status)
handleStatus in class AnimalEntitypublic void updatePassengerPosition(Entity passenger)
updatePassengerPosition in class Entityprotected float getChildHealthBonus()
protected double getChildJumpStrengthBonus()
protected double getChildMovementSpeedBonus()
public boolean isClimbing()
isClimbing in class LivingEntityprotected float getActiveEyeHeight(EntityPose pose, EntityDimensions dimensions)
getActiveEyeHeight in class LivingEntitypublic boolean canEquip()
public boolean setSaddled()
public boolean canEquip(ItemStack item)
@Nullable public Entity getPrimaryPassenger()
getPrimaryPassenger in class Entitypublic Vec3d method_24829(LivingEntity livingEntity)
method_24829 in class Entityprotected void initAttributes()
@Nullable public EntityData initialize(IWorld world, LocalDifficulty difficulty, SpawnType spawnType, @Nullable EntityData entityData, @Nullable CompoundTag entityTag)
initialize in class PassiveEntity