Package net.minecraft.entity.passive
Class LlamaEntity
- All Implemented Interfaces:
class_5568,RangedAttackMob,JumpingMount,Saddleable,InventoryChangedListener,CommandOutput,Nameable
- Direct Known Subclasses:
TraderLlamaEntity
public class LlamaEntity extends AbstractDonkeyEntity implements RangedAttackMob
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classLlamaEntity.ChaseWolvesGoal(package private) static classLlamaEntity.LlamaData(package private) static classLlamaEntity.SpitRevengeGoalNested classes/interfaces inherited from class net.minecraft.entity.passive.PassiveEntity
PassiveEntity.PassiveDataNested classes/interfaces inherited from class net.minecraft.entity.Entity
Entity.PositionUpdater, Entity.RemovalReason -
Field Summary
Fields Modifier and Type Field Description private static TrackedData<Integer>CARPET_COLORprivate LlamaEntityfollowerprivate LlamaEntityfollowingprivate booleanspitprivate static TrackedData<Integer>STRENGTHprivate static IngredientTAMING_INGREDIENTprivate static TrackedData<Integer>VARIANTFields inherited from class net.minecraft.entity.passive.HorseBaseEntity
field_6958, inAir, items, jumpStrength, playExtraHorseSounds, soundTicks, tailWagTicks, temperFields inherited from class net.minecraft.entity.passive.PassiveEntity
breedingAge, forcedAge, happyTicksRemainingFields inherited from class net.minecraft.entity.mob.MobEntity
ambientSoundChance, armorDropChances, experiencePoints, goalSelector, handDropChances, jumpControl, lookControl, moveControl, navigation, targetSelectorFields inherited from class net.minecraft.entity.LivingEntity
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, upwardSpeedFields inherited from class net.minecraft.entity.Entity
age, dataTracker, distanceTraveled, fallDistance, field_25599, firstUpdate, FLAGS, fluidHeight, glowing, horizontalCollision, horizontalSpeed, ignoreCameraFrustum, inanimate, inNetherPortal, inPowderSnow, lastNetherPortalPosition, lastRenderX, lastRenderY, lastRenderZ, LOGGER, movementMultiplier, netherPortalTime, noClip, onGround, pitch, POSE, prevHorizontalSpeed, prevPitch, prevX, prevY, prevYaw, prevZ, pushSpeedReduction, random, ridingCooldown, stepHeight, submergedInWater, timeUntilRegen, touchingWater, uuid, uuidString, velocityDirty, velocityModified, verticalCollision, world, yawFields inherited from interface net.minecraft.server.command.CommandOutput
DUMMY -
Constructor Summary
Constructors Constructor Description LlamaEntity(EntityType<? extends LlamaEntity> type, World world) -
Method Summary
Modifier and Type Method Description voidattack(LivingEntity target, float pullProgress)booleancanBeControlledByRider()booleancanBeSaddled()booleancanBreedWith(AnimalEntity other)protected LlamaEntitycreateChild()LlamaEntitycreateChild(ServerWorld serverWorld, PassiveEntity passiveEntity)static DefaultAttributeContainer.BuildercreateLlamaAttributes()booleaneatsGrass()voidfollow(LlamaEntity llama)protected SoundEventgetAmbientSound()protected SoundEventgetAngrySound()DyeColorgetCarpetColor()private static DyeColorgetColorFromCarpet(ItemStack color)protected SoundEventgetDeathSound()protected SoundEventgetEatSound()LlamaEntitygetFollowing()protected SoundEventgetHurtSound(DamageSource source)intgetInventoryColumns()protected intgetInventorySize()intgetMaxTemper()doublegetMountedHeightOffset()protected doublegetRunFromLeashSpeed()intgetStrength()intgetVariant()booleanhandleFallDamage(float fallDistance, float damageMultiplier)booleanhasArmorInSlot()Whether this horse already has an item stack in its horse armor slot.booleanhasArmorSlot()Whether this horse has a slot for custom equipment besides a saddle.booleanhasFollower()protected voidinitDataTracker()protected voidinitGoals()EntityDatainitialize(ServerWorldAccess world, LocalDifficulty difficulty, SpawnReason spawnReason, EntityData entityData, CompoundTag entityTag)private voidinitializeStrength()booleanisBreedingItem(ItemStack stack)booleanisFollowing()booleanisHorseArmor(ItemStack item)Whether the given item stack is valid for this horse's armor slot.protected booleanisImmobile()booleanisTrader()Vec3dmethod_29919()voidonInventoryChanged(Inventory sender)protected voidplayAddChestSound()voidplayAngrySound()protected voidplayStepSound(BlockPos pos, BlockState state)voidreadCustomDataFromTag(CompoundTag tag)protected booleanreceiveFood(PlayerEntity player, ItemStack item)private voidsetCarpetColor(DyeColor color)private voidsetSpit(boolean spit)private voidsetStrength(int strength)voidsetVariant(int variant)private voidspitAt(LivingEntity target)voidstopFollowing()voidupdatePassengerPosition(Entity passenger)protected voidupdateSaddle()protected voidwalkToParent()voidwriteCustomDataToTag(CompoundTag tag)Methods inherited from class net.minecraft.entity.passive.AbstractDonkeyEntity
createAbstractDonkeyAttributes, dropInventory, hasChest, initAttributes, interactMob, method_32318, setHasChestMethods inherited from class net.minecraft.entity.passive.HorseBaseEntity
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, updatePassengerForDismountMethods inherited from class net.minecraft.entity.passive.AnimalEntity
breed, canEat, canImmediatelyDespawn, damage, eat, getCurrentExperience, getHeightOffset, getLoveTicks, getLovingPlayer, getPathfindingFavor, isInLove, isValidNaturalSpawn, lovePlayer, mobTick, resetLoveTicks, setLoveTicksMethods inherited from class net.minecraft.entity.passive.PassiveEntity
getBreedingAge, growUp, growUp, isBaby, isReadyToBreed, onGrowUp, onTrackedDataSet, setBaby, setBreedingAgeMethods inherited from class net.minecraft.entity.mob.PathAwareEntity
canSpawn, getPathfindingFavor, isNavigating, updateLeashMethods inherited from class net.minecraft.entity.mob.MobEntity
attachLeash, baseTick, canBeLeashedBy, canEquip, 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, getPickBlockStack, getPositionTarget, getPositionTargetRange, 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, method_33191, 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, updateGoalControlsMethods inherited from class net.minecraft.entity.LivingEntity
addSoulSpeedBoostIfNeeded, addStatusEffect, animateDamage, applyArmorToDamage, applyDamage, applyEnchantmentsToDamage, applyMovementEffects, applyStatusEffect, attackLivingEntity, canBeRiddenInWater, canBreatheInWater, canDropLootAndXp, canFreeze, 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_29500, method_30633, method_31079, method_32324, method_32325, method_32326, method_33190, 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, shouldSwimInFluids, sleep, spawnConsumptionEffects, stopRiding, stopUsingItem, swingHand, swingHand, takeKnockback, takeShieldHit, teleport, tickCramming, tickHandSwing, tickRiding, tickRiptide, tickStatusEffects, triggerItemPickedUpByEntityCriteria, updatePostDeath, updatePotionVisibility, updateTrackedHeadRotation, updateTrackedPositionAndAngles, wakeUpMethods inherited from class net.minecraft.entity.Entity
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, discard, dismountVehicle, distanceTo, doesNotCollide, doesRenderOnFire, dropItem, dropItem, dropStack, dropStack, emitGameEvent, entityDataRequiresOperator, equals, extinguish, fromTag, getAir, getBlockPos, getBlockX, getBlockY, getBlockZ, getBodyY, getBoundingBox, getBrightnessAtEyes, getBurningDuration, getCameraPosVec, getChunkPos, getCommandSource, getCustomName, getDataTracker, getDefaultName, getDefaultNetherPortalCooldown, getDisplayName, getEffectiveExplosionResistance, getEntityId, getEntityName, getEntityWorld, getEyeHeight, getEyeY, getFireTicks, getFirstPassenger, getFlag, getFluidHeight, getFreezingScale, getFrozenTicks, getHeight, getHighSpeedSplashSound, getHorizontalFacing, getHoverEvent, getItemsEquipped, getJumpVelocityMultiplier, getLandingBlockState, getLandingPos, getMaxAir, getMaxNetherPortalTime, getMinFreezeDamageTicks, 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, isCollidable, isConnectedThroughVehicle, isCustomNameVisible, isDescending, isFireImmune, isFreezing, isGlowing, isImmuneToExplosion, isInLava, isInRange, isInsideWaterOrBubbleColumn, isInSneakingPose, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isLiving, isOnFire, isOnGround, isPartOf, isPlayer, isRemoved, isSilent, isSneaking, isSneaky, isSpectator, isSprinting, isSubmergedIn, isSubmergedInWater, isSwimming, isTeammate, isTeamPlayer, isTouchingWater, isTouchingWaterOrRain, isWet, method_29241, method_30330, method_30632, method_30634, method_30950, method_30951, method_31166, method_31473, method_31744, method_31746, method_31748, method_32875, method_32877, method_33189, move, moveToBoundingBoxCenter, moveToWorld, offsetX, offsetZ, onBlockCollision, onBubbleColumnCollision, onBubbleColumnSurfaceCollision, onKilledOther, onPassengerLookAround, onPlayerCollision, onSpawnPacket, 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, setFrozenTicks, setGlowing, setInNetherPortal, setInPowderSnow, setInvisible, setInvulnerable, setNoGravity, setOnFireFor, setOnFireFromLava, setPos, setPose, setRemoved, setRenderDistanceMultiplier, setRotation, setSilent, setSneaking, setSwimming, setUuid, setVelocity, setVelocity, setVelocityClient, shouldBroadcastConsoleToOps, shouldLeaveSwimmingPose, shouldReceiveFeedback, shouldRender, shouldRender, shouldSetPositionOnLoad, shouldSpawnSprintingParticles, shouldTrackOutput, slowMovement, spawnSprintingParticles, squaredDistanceTo, squaredDistanceTo, squaredDistanceTo, squaredHorizontalLength, startRiding, streamPassengersRecursively, teleport, tickNetherPortal, tickNetherPortalCooldown, toListTag, toListTag, toString, toTag, unsetRemoved, updateKilledAdvancementCriterion, updateMovementInFluid, updatePosition, updatePositionAndAngles, updateSwimming, updateTrackedPosition, updateTrackedPosition, updateVelocity, updateWaterState, wouldPoseNotCollide
-
Field Details
-
TAMING_INGREDIENT
-
STRENGTH
-
CARPET_COLOR
-
VARIANT
-
spit
private boolean spit -
following
-
follower
-
-
Constructor Details
-
LlamaEntity
-
-
Method Details
-
isTrader
@Environment(CLIENT) public boolean isTrader() -
setStrength
private void setStrength(int strength) -
initializeStrength
private void initializeStrength() -
getStrength
public int getStrength() -
writeCustomDataToTag
- Overrides:
writeCustomDataToTagin classAbstractDonkeyEntity
-
readCustomDataFromTag
- Overrides:
readCustomDataFromTagin classAbstractDonkeyEntity
-
initGoals
protected void initGoals()- Overrides:
initGoalsin classHorseBaseEntity
-
createLlamaAttributes
-
initDataTracker
protected void initDataTracker()- Overrides:
initDataTrackerin classAbstractDonkeyEntity
-
getVariant
public int getVariant() -
setVariant
public void setVariant(int variant) -
getInventorySize
protected int getInventorySize()- Overrides:
getInventorySizein classAbstractDonkeyEntity
-
updatePassengerPosition
- Overrides:
updatePassengerPositionin classHorseBaseEntity
-
getMountedHeightOffset
public double getMountedHeightOffset()- Overrides:
getMountedHeightOffsetin classAbstractDonkeyEntity
-
canBeControlledByRider
public boolean canBeControlledByRider()- Overrides:
canBeControlledByRiderin classHorseBaseEntity
-
isBreedingItem
- Overrides:
isBreedingItemin classHorseBaseEntity
-
receiveFood
- Overrides:
receiveFoodin classHorseBaseEntity
-
isImmobile
protected boolean isImmobile()- Overrides:
isImmobilein classHorseBaseEntity
-
initialize
@Nullable public EntityData initialize(ServerWorldAccess world, LocalDifficulty difficulty, SpawnReason spawnReason, @Nullable EntityData entityData, @Nullable CompoundTag entityTag)- Overrides:
initializein classHorseBaseEntity
-
getAngrySound
- Overrides:
getAngrySoundin classHorseBaseEntity
-
getAmbientSound
- Overrides:
getAmbientSoundin classHorseBaseEntity
-
getHurtSound
- Overrides:
getHurtSoundin classHorseBaseEntity
-
getDeathSound
- Overrides:
getDeathSoundin classHorseBaseEntity
-
getEatSound
- Overrides:
getEatSoundin classHorseBaseEntity
-
playStepSound
- Overrides:
playStepSoundin classHorseBaseEntity
-
playAddChestSound
protected void playAddChestSound()- Overrides:
playAddChestSoundin classAbstractDonkeyEntity
-
playAngrySound
public void playAngrySound()- Overrides:
playAngrySoundin classHorseBaseEntity
-
getInventoryColumns
public int getInventoryColumns()- Overrides:
getInventoryColumnsin classAbstractDonkeyEntity
-
hasArmorSlot
public boolean hasArmorSlot()Whether this horse has a slot for custom equipment besides a saddle.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.
- Overrides:
hasArmorSlotin classHorseBaseEntity
-
hasArmorInSlot
public boolean hasArmorInSlot()Whether this horse already has an item stack in its horse armor slot.- Overrides:
hasArmorInSlotin classHorseBaseEntity- See Also:
hasArmorSlot()
-
isHorseArmor
Whether the given item stack is valid for this horse's armor slot.- Overrides:
isHorseArmorin classHorseBaseEntity- See Also:
hasArmorSlot()
-
canBeSaddled
public boolean canBeSaddled()- Specified by:
canBeSaddledin interfaceSaddleable- Overrides:
canBeSaddledin classHorseBaseEntity
-
onInventoryChanged
- Specified by:
onInventoryChangedin interfaceInventoryChangedListener- Overrides:
onInventoryChangedin classHorseBaseEntity
-
updateSaddle
protected void updateSaddle()- Overrides:
updateSaddlein classHorseBaseEntity
-
setCarpetColor
-
getColorFromCarpet
-
getCarpetColor
-
getMaxTemper
public int getMaxTemper()- Overrides:
getMaxTemperin classHorseBaseEntity
-
canBreedWith
- Overrides:
canBreedWithin classHorseBaseEntity
-
createChild
- Overrides:
createChildin classHorseBaseEntity
-
createChild
-
spitAt
-
setSpit
private void setSpit(boolean spit) -
handleFallDamage
public boolean handleFallDamage(float fallDistance, float damageMultiplier)- Overrides:
handleFallDamagein classHorseBaseEntity
-
stopFollowing
public void stopFollowing() -
follow
-
hasFollower
public boolean hasFollower() -
isFollowing
public boolean isFollowing() -
getFollowing
-
getRunFromLeashSpeed
protected double getRunFromLeashSpeed()- Overrides:
getRunFromLeashSpeedin classPathAwareEntity
-
walkToParent
protected void walkToParent()- Overrides:
walkToParentin classHorseBaseEntity
-
eatsGrass
public boolean eatsGrass()- Overrides:
eatsGrassin classHorseBaseEntity
-
attack
- Specified by:
attackin interfaceRangedAttackMob
-
method_29919
- Overrides:
method_29919in classEntity
-