public class LlamaEntity extends AbstractDonkeyEntity implements RangedAttackMob
Modifier and Type | Class and Description |
---|---|
(package private) static class |
LlamaEntity.ChaseWolvesGoal |
(package private) static class |
LlamaEntity.LlamaData |
(package private) static class |
LlamaEntity.SpitRevengeGoal |
PassiveEntity.PassiveData
Entity.PositionUpdater
Modifier and Type | Field and Description |
---|---|
private static TrackedData<Integer> |
CARPET_COLOR |
private LlamaEntity |
follower |
private LlamaEntity |
following |
private boolean |
spit |
private static TrackedData<Integer> |
STRENGTH |
private static Ingredient |
TAMING_INGREDIENT |
private static TrackedData<Integer> |
VARIANT |
field_6958, inAir, items, jumpStrength, playExtraHorseSounds, soundTicks, tailWagTicks, temper
breedingAge, forcedAge, happyTicksRemaining
ambientSoundChance, armorDropChances, experiencePoints, goalSelector, handDropChances, jumpControl, lookControl, moveControl, navigation, targetSelector
activeItemStack, attackingPlayer, bodyTrackingIncrements, bodyYaw, brain, dead, deathTime, defaultMaxHealth, despawnCounter, 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, randomLargeSeed, randomSmallSeed, riptideTicks, roll, scoreAmount, serverHeadYaw, serverPitch, serverX, serverY, serverYaw, serverZ, sidewaysSpeed, SLEEPING_DIMENSIONS, stepBobbingAmount, stuckArrowTimer, stuckStingerTimer, upwardSpeed
age, chunkX, chunkY, chunkZ, dataTracker, distanceTraveled, fallDistance, field_25599, firstUpdate, FLAGS, fluidHeight, glowing, horizontalCollision, horizontalSpeed, ignoreCameraFrustum, inanimate, inNetherPortal, lastNetherPortalPosition, lastRenderX, lastRenderY, lastRenderZ, LOGGER, movementMultiplier, netherPortalTime, noClip, onGround, pitch, POSE, prevHorizontalSpeed, prevPitch, prevX, prevY, prevYaw, prevZ, pushSpeedReduction, random, removed, ridingCooldown, stepHeight, submergedInWater, teleporting, timeUntilRegen, touchingWater, updateNeeded, uuid, uuidString, velocityDirty, velocityModified, verticalCollision, world, yaw
DUMMY
Constructor and Description |
---|
LlamaEntity(EntityType<? extends LlamaEntity> type,
World world) |
Modifier and Type | Method and Description |
---|---|
void |
attack(LivingEntity target,
float pullProgress) |
boolean |
canBeControlledByRider() |
boolean |
canBeSaddled() |
boolean |
canBreedWith(AnimalEntity other) |
protected LlamaEntity |
createChild() |
LlamaEntity |
createChild(ServerWorld serverWorld,
PassiveEntity passiveEntity) |
static DefaultAttributeContainer.Builder |
createLlamaAttributes() |
boolean |
eatsGrass() |
void |
follow(LlamaEntity llama) |
protected SoundEvent |
getAmbientSound() |
protected SoundEvent |
getAngrySound() |
DyeColor |
getCarpetColor() |
private static DyeColor |
getColorFromCarpet(ItemStack color) |
protected SoundEvent |
getDeathSound() |
protected SoundEvent |
getEatSound() |
LlamaEntity |
getFollowing() |
protected SoundEvent |
getHurtSound(DamageSource source) |
int |
getInventoryColumns() |
protected int |
getInventorySize() |
int |
getMaxTemper() |
double |
getMountedHeightOffset() |
protected double |
getRunFromLeashSpeed() |
int |
getStrength() |
int |
getVariant() |
boolean |
handleFallDamage(float fallDistance,
float damageMultiplier) |
boolean |
hasArmorInSlot()
Whether this horse already has an item stack in its horse armor slot.
|
boolean |
hasArmorSlot()
Whether this horse has a slot for custom equipment besides a saddle.
|
boolean |
hasFollower() |
protected void |
initDataTracker() |
protected void |
initGoals() |
EntityData |
initialize(ServerWorldAccess world,
LocalDifficulty difficulty,
SpawnReason spawnReason,
EntityData entityData,
CompoundTag entityTag) |
private void |
initializeStrength() |
boolean |
isBreedingItem(ItemStack stack) |
boolean |
isFollowing() |
boolean |
isHorseArmor(ItemStack item)
Whether the given item stack is valid for this horse's armor slot.
|
protected boolean |
isImmobile() |
boolean |
isTrader() |
Vec3d |
method_29919() |
void |
onInventoryChanged(Inventory sender) |
protected void |
playAddChestSound() |
void |
playAngrySound() |
protected void |
playStepSound(BlockPos pos,
BlockState state) |
void |
readCustomDataFromTag(CompoundTag tag) |
protected boolean |
receiveFood(PlayerEntity player,
ItemStack item) |
private void |
setCarpetColor(DyeColor color) |
private void |
setSpit(boolean spit) |
private void |
setStrength(int strength) |
void |
setVariant(int variant) |
private void |
spitAt(LivingEntity target) |
void |
stopFollowing() |
void |
updatePassengerPosition(Entity passenger) |
protected void |
updateSaddle() |
protected void |
walkToParent() |
void |
writeCustomDataToTag(CompoundTag tag) |
createAbstractDonkeyAttributes, dropInventory, equip, hasChest, initAttributes, interactMob, setHasChest
addTemper, bondWithPlayer, canBreed, canJump, computeFallDamage, createBaseHorseAttributes, getActiveEyeHeight, getAngryAnimationProgress, getChildHealthBonus, getChildJumpStrengthBonus, getChildMovementSpeedBonus, getEatingAnimationProgress, getEatingGrassAnimationProgress, getHorseFlag, getJumpStrength, getLimitPerChunk, getMinAmbientSoundDelay, getOwnerUuid, getPrimaryPassenger, getSoundVolume, getTemper, handleStatus, initCustomGoals, isAngry, isBred, isClimbing, isEatingGrass, isInAir, isPushable, isSaddled, isTame, method_30009, onChestedStatusChanged, openInventory, playJumpSound, playWalkSound, putPlayerOnBack, saddle, setAngry, setBred, setChildAttributes, setEatingGrass, setHorseFlag, setInAir, setJumpStrength, setOwnerUuid, setTame, setTemper, spawnPlayerReactionParticles, startJumping, stopJumping, tick, tickMovement, travel, updateForLeashLength, updatePassengerForDismount
breed, canEat, canImmediatelyDespawn, damage, eat, getCurrentExperience, getHeightOffset, getLoveTicks, getLovingPlayer, getPathfindingFavor, isInLove, isValidNaturalSpawn, lovePlayer, mobTick, resetLoveTicks, setLoveTicks
getBreedingAge, growUp, growUp, isBaby, isReadyToBreed, onGrowUp, onTrackedDataSet, setBaby, setBreedingAge
canSpawn, getPathfindingFavor, isNavigating, updateLeash
attachLeash, baseTick, canBeLeashedBy, canEquip, canEquipmentSlotContain, canGather, canMobSpawn, canMoveVoluntarily, cannotDespawn, canPickupItem, canPickUpLoot, canSpawn, canTarget, canTarget, canUseRangedWeapon, 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, isAffectedByDaylight, isAiDisabled, isAttacking, isDisallowedInPeaceful, isInWalkTargetRange, isInWalkTargetRange, isLeashed, isLeftHanded, isLogicalSideForUpdatingMovement, isPersistent, lookAtEntity, loot, method_29243, method_29244, method_30076, method_30758, method_30759, movesIndependently, onEatingGrass, onPlayerSpawnedChild, playAmbientSound, playHurtSound, playSpawnEffects, prefersNewDamageableItem, prefersNewEquipment, sendAiDebugData, setAiDisabled, setAttacking, setCanPickUpLoot, setEquipmentDropChance, setForwardSpeed, setHoldingEntityId, setLeftHanded, setMovementSpeed, setPathfindingPenalty, setPersistent, setPositionTarget, setSidewaysSpeed, setTarget, setUpwardSpeed, spawnsTooManyForEachTry, startRiding, swimUpward, tickNewAi, tryAttack, tryEquip, turnHead, updateDropChances, updateEnchantments, updateGoalControls
addSoulSpeedBoostIfNeeded, addStatusEffect, animateDamage, applyArmorToDamage, applyDamage, applyEnchantmentsToDamage, applyMovementEffects, applyStatusEffect, attackLivingEntity, canBeRiddenInWater, canBreatheInWater, canDropLootAndXp, canHaveStatusEffect, canSee, canWalkOnFluid, clearActiveItem, clearPotionSwirls, clearSleepingPosition, clearStatusEffects, collides, consumeItem, containsOnlyAmbientEffects, createBrainProfile, createLivingAttributes, createSpawnPacket, damageArmor, damageShield, deserializeBrain, destroy, displaySoulSpeedEffects, drop, dropXp, eatFood, endCombat, enterCombat, fall, getAbsorptionAmount, getActiveHand, getActiveItem, getActiveStatusEffects, getArmor, getArmorVisibility, getArrowType, getAttackDistanceScalingFactor, getAttacker, getAttacking, getAttributeBaseValue, getAttributeInstance, getAttributes, getAttributeValue, getBaseMovementSpeedMultiplier, getBlockState, getBoundingBox, getBrain, getClimbingPos, getDamageTracker, getDespawnCounter, getDimensions, getDrinkSound, getEatSound, getEyeHeight, getFallSound, getGroup, getHandSwingProgress, getHeadYaw, getHealth, getItemUseTime, getItemUseTimeLeft, getJumpVelocity, getLastAttackedTime, getLastAttackTime, getLeaningPitch, getMainHandStack, getMaxHealth, getMovementSpeed, getNextAirOnLand, getNextAirUnderwater, getOffHandStack, getPoses, getPrimeAdversary, getRandom, getRecentDamageSource, getRoll, getScaleFactor, getSleepingDirection, getSleepingPosition, getSoundPitch, getStackInHand, getStatusEffect, getStatusEffects, getStingerCount, getStuckArrowCount, getVelocityMultiplier, getVisibilityBoundingBox, getYaw, hasStackEquipped, hasStatusEffect, heal, hurtByWater, isAffectedBySplashPotions, isAlive, isBlocking, isDead, isFallFlying, isHolding, isHolding, isHoldingOntoLadder, isInsideWall, isInSwimmingPose, isMobOrPlayer, isOnSoulSpeedBlock, isSleeping, isTarget, isUndead, isUsingItem, isUsingRiptide, jump, kill, knockback, knockDownwards, lookAt, markEffectsDirty, method_26317, method_26318, method_29242, method_29499, method_29500, method_29920, method_30633, method_31079, onAttacking, onDeath, onEquipStack, onKilledBy, onStatusEffectApplied, onStatusEffectRemoved, onStatusEffectUpgraded, playBlockFallSound, pushAway, pushAwayFrom, removeSoulSpeedBoost, removeStatusEffect, removeStatusEffectInternal, scheduleVelocityUpdate, sendEquipmentBreakStatus, sendPickup, sendToolBreakStatus, setAbsorptionAmount, setAttacker, setAttacking, setCurrentHand, setDespawnCounter, setHeadYaw, setHealth, setJumping, setLivingFlag, setNearbySongPlaying, setOnGround, setRiptideTicks, setSleepingPosition, setSprinting, setStackInHand, setStingerCount, setStuckArrowCount, setYaw, shouldAlwaysDropXp, shouldDisplaySoulSpeedEffects, shouldDropLoot, shouldRenderName, sleep, spawnConsumptionEffects, stopRiding, stopUsingItem, swingHand, swingHand, takeKnockback, takeShieldHit, teleport, tickCramming, tickHandSwing, tickRiding, tickRiptide, tickStatusEffects, updatePostDeath, updatePotionVisibility, updateTrackedHeadRotation, updateTrackedPositionAndAngles, wakeUp
addPassenger, addScoreboardTag, addVelocity, adjustMovementForCollisions, adjustMovementForCollisions, adjustMovementForPiston, adjustMovementForSneaking, adjustSingleAxisMovementForCollisions, afterSpawn, applyMirror, applyRotation, bypassesLandingEffects, bypassesSteppingEffects, calculateBoundsForPose, calculateDimensions, calculateNextStepSoundDistance, canAddPassenger, canAvoidTraps, canBeSpectated, canClimb, canExplosionDestroyBlock, canFly, canStartRiding, canUsePortals, changeLookDirection, checkBlockCollision, collidesWith, copyFrom, copyPositionAndRotation, dealDamage, detach, distanceTo, doesNotCollide, doesRenderOnFire, dropItem, dropItem, dropStack, dropStack, entityDataRequiresOperator, equals, extinguish, fromTag, getAir, getBlockPos, getBodyY, getBoundingBox, getBrightnessAtEyes, getBurningDuration, getCameraPosVec, getCommandSource, getCustomName, getDataTracker, getDefaultName, getDefaultNetherPortalCooldown, getDisplayName, getEffectiveExplosionResistance, getEntityId, getEntityName, getEntityWorld, getEyeHeight, getEyeY, getFireTicks, getFlag, getFluidHeight, getHeight, getHighSpeedSplashSound, getHorizontalFacing, getHoverEvent, getItemsEquipped, getJumpVelocityMultiplier, getLandingBlockState, getLandingPos, getMaxAir, getMaxNetherPortalTime, getMovementDirection, getName, getOppositeRotationVector, getOppositeRotationVector, getParticleX, getParticleZ, getPassengerDismountOffset, 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, getTeleportTarget, getTrackedPosition, getType, getUuid, getUuidAsString, getVehicle, getVelocity, getVelocityAffectingPos, getWidth, getX, getY, getZ, handleAttack, hasCustomName, hashCode, hasNetherPortalCooldown, hasNoGravity, hasPassenger, hasPassengerDeep, hasPassengers, hasPassengerType, hasPermissionLevel, hasPlayerRider, hasVehicle, hasWings, interactAt, isAttackable, isChunkPosUpdateRequested, isCollidable, isConnectedThroughVehicle, isCustomNameVisible, isDescending, isFireImmune, isGlowing, isImmuneToExplosion, isInLava, isInRange, isInsideWaterOrBubbleColumn, isInSneakingPose, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isLiving, isOnFire, isOnGround, isPartOf, isSilent, isSneaking, isSneaky, isSpectator, isSprinting, isSubmergedIn, isSubmergedInWater, isSwimming, isTeammate, isTeamPlayer, isTouchingWater, isTouchingWaterOrRain, isWet, method_29239, method_29241, method_30330, method_30632, method_30634, method_30950, method_30951, method_31166, move, moveToBoundingBoxCenter, moveToWorld, offsetX, offsetZ, onBlockCollision, onBubbleColumnCollision, onBubbleColumnSurfaceCollision, onKilledOther, onPassengerLookAround, onPlayerCollision, onStartedTrackingBy, onStoppedTrackingBy, onStruckByLightning, onSwimmingStart, playFlySound, playSound, playSwimSound, populateCrashReport, pushOutOfBlocks, raycast, refreshPosition, refreshPositionAfterTeleport, refreshPositionAfterTeleport, refreshPositionAndAngles, refreshPositionAndAngles, remove, removeAllPassengers, removePassenger, removeScoreboardTag, requestTeleport, resetNetherPortalCooldown, resetPosition, saveSelfToTag, saveToTag, sendSystemMessage, setAir, setBoundingBox, setCustomName, setCustomNameVisible, setEntityId, setFireTicks, setFlag, setGlowing, setInNetherPortal, setInvisible, setInvulnerable, setNoGravity, setOnFireFor, setOnFireFromLava, setPos, setPose, setRenderDistanceMultiplier, setRotation, setSilent, setSneaking, setSwimming, setUuid, setVelocity, setVelocity, setVelocityClient, setWorld, shouldBroadcastConsoleToOps, shouldLeaveSwimmingPose, shouldReceiveFeedback, shouldRender, shouldRender, shouldSetPositionOnLoad, shouldSpawnSprintingParticles, shouldTrackOutput, slowMovement, spawnSprintingParticles, squaredDistanceTo, squaredDistanceTo, squaredDistanceTo, squaredHorizontalLength, startRiding, streamPassengersRecursively, teleport, teleportRequested, tickNetherPortal, tickNetherPortalCooldown, toListTag, toListTag, toString, toTag, updateKilledAdvancementCriterion, updateMovementInFluid, updatePosition, updatePositionAndAngles, updateSwimming, updateTrackedPosition, updateTrackedPosition, updateVelocity, updateWaterState, wouldPoseNotCollide
private static final Ingredient TAMING_INGREDIENT
private static final TrackedData<Integer> STRENGTH
private static final TrackedData<Integer> CARPET_COLOR
private static final TrackedData<Integer> VARIANT
private boolean spit
@Nullable private LlamaEntity following
@Nullable private LlamaEntity follower
public LlamaEntity(EntityType<? extends LlamaEntity> type, World world)
@Environment(value=CLIENT) public boolean isTrader()
private void setStrength(int strength)
private void initializeStrength()
public int getStrength()
public void writeCustomDataToTag(CompoundTag tag)
writeCustomDataToTag
in class AbstractDonkeyEntity
public void readCustomDataFromTag(CompoundTag tag)
readCustomDataFromTag
in class AbstractDonkeyEntity
protected void initGoals()
initGoals
in class HorseBaseEntity
public static DefaultAttributeContainer.Builder createLlamaAttributes()
protected void initDataTracker()
initDataTracker
in class AbstractDonkeyEntity
public int getVariant()
public void setVariant(int variant)
protected int getInventorySize()
getInventorySize
in class AbstractDonkeyEntity
public void updatePassengerPosition(Entity passenger)
updatePassengerPosition
in class HorseBaseEntity
public double getMountedHeightOffset()
getMountedHeightOffset
in class AbstractDonkeyEntity
public boolean canBeControlledByRider()
canBeControlledByRider
in class HorseBaseEntity
public boolean isBreedingItem(ItemStack stack)
isBreedingItem
in class HorseBaseEntity
protected boolean receiveFood(PlayerEntity player, ItemStack item)
receiveFood
in class HorseBaseEntity
protected boolean isImmobile()
isImmobile
in class HorseBaseEntity
@Nullable public EntityData initialize(ServerWorldAccess world, LocalDifficulty difficulty, SpawnReason spawnReason, @Nullable EntityData entityData, @Nullable CompoundTag entityTag)
initialize
in class HorseBaseEntity
protected SoundEvent getAngrySound()
getAngrySound
in class HorseBaseEntity
protected SoundEvent getAmbientSound()
getAmbientSound
in class HorseBaseEntity
protected SoundEvent getHurtSound(DamageSource source)
getHurtSound
in class HorseBaseEntity
protected SoundEvent getDeathSound()
getDeathSound
in class HorseBaseEntity
@Nullable protected SoundEvent getEatSound()
getEatSound
in class HorseBaseEntity
protected void playStepSound(BlockPos pos, BlockState state)
playStepSound
in class HorseBaseEntity
protected void playAddChestSound()
playAddChestSound
in class AbstractDonkeyEntity
public void playAngrySound()
playAngrySound
in class HorseBaseEntity
public int getInventoryColumns()
getInventoryColumns
in class AbstractDonkeyEntity
public boolean hasArmorSlot()
In the item slot argument type, the slot is referred to as
horse.armor
. In this horse's screen, it appears in the middle of
the left side, and right below the saddle slot if this horse has a saddle
slot.
This is used by horse armors and llama carpets, but can be refitted to any purpose.
hasArmorSlot
in class HorseBaseEntity
public boolean hasArmorInSlot()
hasArmorInSlot
in class HorseBaseEntity
hasArmorSlot()
public boolean isHorseArmor(ItemStack item)
isHorseArmor
in class HorseBaseEntity
hasArmorSlot()
public boolean canBeSaddled()
canBeSaddled
in interface Saddleable
canBeSaddled
in class HorseBaseEntity
public void onInventoryChanged(Inventory sender)
onInventoryChanged
in interface InventoryChangedListener
onInventoryChanged
in class HorseBaseEntity
protected void updateSaddle()
updateSaddle
in class HorseBaseEntity
public int getMaxTemper()
getMaxTemper
in class HorseBaseEntity
public boolean canBreedWith(AnimalEntity other)
canBreedWith
in class HorseBaseEntity
public LlamaEntity createChild(ServerWorld serverWorld, PassiveEntity passiveEntity)
createChild
in class HorseBaseEntity
protected LlamaEntity createChild()
private void spitAt(LivingEntity target)
private void setSpit(boolean spit)
public boolean handleFallDamage(float fallDistance, float damageMultiplier)
handleFallDamage
in class HorseBaseEntity
public void stopFollowing()
public void follow(LlamaEntity llama)
public boolean hasFollower()
public boolean isFollowing()
@Nullable public LlamaEntity getFollowing()
protected double getRunFromLeashSpeed()
getRunFromLeashSpeed
in class PathAwareEntity
protected void walkToParent()
walkToParent
in class HorseBaseEntity
public boolean eatsGrass()
eatsGrass
in class HorseBaseEntity
public void attack(LivingEntity target, float pullProgress)
attack
in interface RangedAttackMob
@Environment(value=CLIENT) public Vec3d method_29919()
method_29919
in class Entity