public class PandaEntity extends AnimalEntity
Modifier and Type | Class and Description |
---|---|
(package private) static class |
PandaEntity.AttackGoal |
(package private) static class |
PandaEntity.ExtinguishFireGoal |
static class |
PandaEntity.Gene |
(package private) static class |
PandaEntity.LieOnBackGoal |
(package private) static class |
PandaEntity.LookAtEntityGoal |
(package private) static class |
PandaEntity.PandaFleeGoal<T extends LivingEntity> |
(package private) class |
PandaEntity.PandaMateGoal |
(package private) static class |
PandaEntity.PandaMoveControl |
(package private) static class |
PandaEntity.PandaRevengeGoal |
(package private) class |
PandaEntity.PickUpFoodGoal |
(package private) static class |
PandaEntity.PlayGoal |
(package private) static class |
PandaEntity.SneezeGoal |
PassiveEntity.PassiveData
Entity.PositionUpdater
Modifier and Type | Field and Description |
---|---|
private static TargetPredicate |
ASK_FOR_BAMBOO_TARGET |
private static TrackedData<Integer> |
ASK_FOR_BAMBOO_TICKS |
private static TrackedData<Integer> |
EATING_TICKS |
private static TrackedData<Byte> |
HIDDEN_GENE |
private static Predicate<ItemEntity> |
IS_FOOD |
private float |
lastLieOnBackAnimationProgress |
private float |
lastRollOverAnimationProgress |
private float |
lastScaredAnimationProgress |
private float |
lieOnBackAnimationProgress |
private PandaEntity.LookAtEntityGoal |
lookAtPlayerGoal |
private static TrackedData<Byte> |
MAIN_GENE |
private static TrackedData<Byte> |
PANDA_FLAGS |
private Vec3d |
playingJump |
int |
playingTicks |
private float |
rollOverAnimationProgress |
private float |
scaredAnimationProgress |
private boolean |
shouldAttack |
private boolean |
shouldGetRevenge |
private static TrackedData<Integer> |
SNEEZE_PROGRESS |
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, jumping, 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 |
---|
PandaEntity(EntityType<? extends PandaEntity> type,
World world) |
breed, canBreedWith, canEat, canImmediatelyDespawn, eat, getCurrentExperience, getHeightOffset, getLoveTicks, getLovingPlayer, getMinAmbientSoundDelay, getPathfindingFavor, handleStatus, isInLove, isValidNaturalSpawn, lovePlayer, mobTick, resetLoveTicks, setLoveTicks, tickMovement
getBreedingAge, growUp, growUp, isBaby, isReadyToBreed, onGrowUp, onTrackedDataSet, setBaby, setBreedingAge
canSpawn, getPathfindingFavor, getRunFromLeashSpeed, isNavigating, updateForLeashLength, updateLeash
attachLeash, baseTick, canBeControlledByRider, canEquipmentSlotContain, canGather, canMobSpawn, canMoveVoluntarily, cannotDespawn, canPickupItem, canPickUpLoot, canSpawn, canTarget, canTarget, canUseRangedWeapon, checkDespawn, createBodyControl, createMobAttributes, createNavigation, detachLeash, dropEquipment, dropLoot, equip, equipLootStack, equipStack, getArmorItems, getBodyYawSpeed, getDropChance, getEquipmentForSlot, getEquippedStack, getHoldingEntity, getItemsHand, getJumpControl, getLimitPerChunk, getLookControl, getLookPitchSpeed, getLookYawSpeed, getLootContextBuilder, getLootTable, getLootTableId, getMainArm, getMoveControl, getNavigation, getPathfindingPenalty, getPositionTarget, getPositionTargetRange, getPreferredEquipmentSlot, getSafeFallDistance, getTarget, getVisibilityCache, hasPositionTarget, initEquipment, interact, isAffectedByDaylight, isAiDisabled, isDisallowedInPeaceful, isInWalkTargetRange, isInWalkTargetRange, isLeashed, isLeftHanded, isLogicalSideForUpdatingMovement, isPersistent, lookAtEntity, 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, 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, computeFallDamage, consumeItem, containsOnlyAmbientEffects, createBrainProfile, createLivingAttributes, createSpawnPacket, damageArmor, damageShield, deserializeBrain, destroy, displaySoulSpeedEffects, drop, dropInventory, dropXp, eatFood, endCombat, enterCombat, fall, getAbsorptionAmount, getActiveEyeHeight, 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, getSoundVolume, getStackInHand, getStatusEffect, getStatusEffects, getStingerCount, getStuckArrowCount, getVelocityMultiplier, getVisibilityBoundingBox, getYaw, handleFallDamage, hasStackEquipped, hasStatusEffect, heal, hurtByWater, isAffectedBySplashPotions, isAlive, isBlocking, isClimbing, isDead, isFallFlying, isHolding, isHolding, isHoldingOntoLadder, isImmobile, isInsideWall, isInSwimmingPose, isMobOrPlayer, isOnSoulSpeedBlock, isPushable, 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, travel, 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, getMountedHeightOffset, getMovementDirection, getName, getOppositeRotationVector, getOppositeRotationVector, getParticleX, getParticleZ, getPassengerDismountOffset, getPassengerList, getPassengersDeep, getPermissionLevel, getPistonBehavior, getPitch, getPos, getPose, getPrimaryPassenger, 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_29919, 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, updatePassengerForDismount, updatePassengerPosition, updatePosition, updatePositionAndAngles, updateSwimming, updateTrackedPosition, updateTrackedPosition, updateVelocity, updateWaterState, wouldPoseNotCollide
private static final TrackedData<Integer> ASK_FOR_BAMBOO_TICKS
private static final TrackedData<Integer> SNEEZE_PROGRESS
private static final TrackedData<Integer> EATING_TICKS
private static final TrackedData<Byte> MAIN_GENE
private static final TrackedData<Byte> HIDDEN_GENE
private static final TrackedData<Byte> PANDA_FLAGS
private static final TargetPredicate ASK_FOR_BAMBOO_TARGET
private static final Predicate<ItemEntity> IS_FOOD
private boolean shouldGetRevenge
private boolean shouldAttack
public int playingTicks
private Vec3d playingJump
private float scaredAnimationProgress
private float lastScaredAnimationProgress
private float lieOnBackAnimationProgress
private float lastLieOnBackAnimationProgress
private float rollOverAnimationProgress
private float lastRollOverAnimationProgress
private PandaEntity.LookAtEntityGoal lookAtPlayerGoal
public PandaEntity(EntityType<? extends PandaEntity> type, World world)
public int getAskForBambooTicks()
public void setAskForBambooTicks(int askForBambooTicks)
public boolean isSneezing()
public boolean isScared()
public void setScared(boolean scared)
public boolean isLyingOnBack()
public void setLyingOnBack(boolean lyingOnBack)
public boolean isEating()
public void setEating(boolean eating)
private int getEatingTicks()
private void setEatingTicks(int eatingTicks)
public void setSneezing(boolean sneezing)
public int getSneezeProgress()
public void setSneezeProgress(int sneezeProgress)
public PandaEntity.Gene getMainGene()
public void setMainGene(PandaEntity.Gene gene)
public PandaEntity.Gene getHiddenGene()
public void setHiddenGene(PandaEntity.Gene gene)
public boolean isPlaying()
public void setPlaying(boolean playing)
protected void initDataTracker()
initDataTracker
in class PassiveEntity
private boolean hasPandaFlag(int bitmask)
private void setPandaFlag(int mask, boolean value)
public void writeCustomDataToTag(CompoundTag tag)
writeCustomDataToTag
in class AnimalEntity
public void readCustomDataFromTag(CompoundTag tag)
readCustomDataFromTag
in class AnimalEntity
@Nullable public PassiveEntity createChild(ServerWorld world, PassiveEntity entity)
createChild
in class PassiveEntity
public static DefaultAttributeContainer.Builder createPandaAttributes()
public PandaEntity.Gene getProductGene()
public boolean isLazy()
public boolean isWorried()
public boolean isPlayful()
public boolean isWeak()
public boolean isAttacking()
isAttacking
in class MobEntity
public boolean canBeLeashedBy(PlayerEntity player)
canBeLeashedBy
in class MobEntity
public boolean isScaredByThunderstorm()
private void updateEatingAnimation()
private void playEatingAnimation()
private void updateScaredAnimation()
private void updateLieOnBackAnimation()
private void updateRollOverAnimation()
@Environment(value=CLIENT) public float getScaredAnimationProgress(float tickDelta)
@Environment(value=CLIENT) public float getLieOnBackAnimationProgress(float tickDelta)
@Environment(value=CLIENT) public float getRollOverAnimationProgress(float tickDelta)
private void updatePlaying()
private void sneeze()
protected void loot(ItemEntity item)
public boolean damage(DamageSource source, float amount)
damage
in class AnimalEntity
@Nullable public EntityData initialize(ServerWorldAccess world, LocalDifficulty difficulty, SpawnReason spawnReason, @Nullable EntityData entityData, @Nullable CompoundTag entityTag)
initialize
in class PassiveEntity
public void initGenes(PandaEntity mother, @Nullable PandaEntity father)
private PandaEntity.Gene getRandomGene()
public void resetAttributes()
private void stop()
public ActionResult interactMob(PlayerEntity player, Hand hand)
interactMob
in class AnimalEntity
@Nullable protected SoundEvent getAmbientSound()
getAmbientSound
in class MobEntity
protected void playStepSound(BlockPos pos, BlockState state)
playStepSound
in class Entity
public boolean isBreedingItem(ItemStack stack)
isBreedingItem
in class AnimalEntity
private boolean canEat(ItemStack stack)
@Nullable protected SoundEvent getDeathSound()
getDeathSound
in class LivingEntity
@Nullable protected SoundEvent getHurtSound(DamageSource source)
getHurtSound
in class LivingEntity
public boolean isIdle()