public class PandaEntity extends AnimalEntity
Modifier and Type | Class and Description |
---|---|
(package private) static class |
PandaEntity.AttackGoal |
(package private) static class |
PandaEntity.AvoidGoal<T extends LivingEntity> |
(package private) static class |
PandaEntity.ChildPlayGoal |
static class |
PandaEntity.Gene |
(package private) static class |
PandaEntity.LieBackGoal |
(package private) class |
PandaEntity.MateGoal |
(package private) static class |
PandaEntity.MoveHelperController |
(package private) static class |
PandaEntity.PanicGoal |
(package private) static class |
PandaEntity.RevengeGoal |
(package private) static class |
PandaEntity.RollGoal |
(package private) class |
PandaEntity.SitGoal |
(package private) static class |
PandaEntity.WatchGoal |
AgeableEntity.AgeableData
Entity.IMoveCallback
Modifier and Type | Field and Description |
---|---|
private static EntityPredicate |
BREED_TARGETING |
private static DataParameter<java.lang.Byte> |
DATA_ID_FLAGS |
private boolean |
didBite |
private static DataParameter<java.lang.Integer> |
EAT_COUNTER |
private boolean |
gotBamboo |
private static DataParameter<java.lang.Byte> |
HIDDEN_GENE_ID |
private PandaEntity.WatchGoal |
lookAtPlayerGoal |
private static DataParameter<java.lang.Byte> |
MAIN_GENE_ID |
private float |
onBackAmount |
private float |
onBackAmountO |
private static java.util.function.Predicate<ItemEntity> |
PANDA_ITEMS |
private float |
rollAmount |
private float |
rollAmountO |
int |
rollCounter |
private Vector3d |
rollDelta |
private float |
sitAmount |
private float |
sitAmountO |
private static DataParameter<java.lang.Integer> |
SNEEZE_COUNTER |
private static DataParameter<java.lang.Integer> |
UNHAPPY_COUNTER |
age, forcedAge, forcedAgeTimer
ambientSoundTime, armorDropChances, goalSelector, handDropChances, jumpControl, lookControl, moveControl, navigation, targetSelector, xpReward
animationPosition, animationSpeed, animationSpeedOld, animStep, animStepO, attackAnim, attackStrengthTicker, autoSpinAttackTicks, brain, DATA_LIVING_ENTITY_FLAGS, dead, deathScore, deathTime, fallFlyTicks, flyingSpeed, hurtDir, hurtDuration, hurtTime, invulnerableDuration, jumping, lastHurt, lastHurtByPlayer, lastHurtByPlayerTime, lerpHeadSteps, lerpSteps, lerpX, lerpXRot, lerpY, lerpYRot, lerpZ, lyHeadRot, noActionTime, oAttackAnim, oRun, removeArrowTime, removeStingerTime, rotA, rotOffs, run, SLEEPING_DIMENSIONS, swinging, swingingArm, swingTime, timeOffs, useItem, useItemRemaining, xxa, yBodyRot, yBodyRotO, yHeadRot, yHeadRotO, yya, zza
blocksBuilding, boardingCooldown, DATA_POSE, DATA_SHARED_FLAGS_ID, entityData, fallDistance, firstTick, fluidHeight, fluidOnEyes, forcedLoading, glowing, hasImpulse, horizontalCollision, hurtMarked, inChunk, invulnerableTime, isInsidePortal, level, LOGGER, maxUpStep, moveDist, noCulling, noPhysics, onGround, portalEntrancePos, portalTime, pushthrough, random, removed, stringUUID, stuckSpeedMultiplier, tickCount, uuid, verticalCollision, walkDist, walkDistO, wasEyeInWater, wasTouchingWater, xChunk, xo, xOld, xRot, xRotO, yChunk, yo, yOld, yRot, yRotO, zChunk, zo, zOld
NULL
Constructor and Description |
---|
PandaEntity(EntityType<? extends PandaEntity> p_i50252_1_,
World p_i50252_2_) |
Modifier and Type | Method and Description |
---|---|
void |
addAdditionalSaveData(CompoundNBT p_213281_1_) |
private void |
addEatingParticles() |
private void |
afterSneeze() |
boolean |
canBeLeashed(PlayerEntity p_184652_1_) |
boolean |
canPerformAction() |
boolean |
canTakeItem(ItemStack p_213365_1_) |
static AttributeModifierMap.MutableAttribute |
createAttributes() |
protected void |
defineSynchedData() |
boolean |
doHurtTarget(Entity p_70652_1_) |
void |
eat(boolean p_213534_1_) |
ILivingEntityData |
finalizeSpawn(IServerWorld p_213386_1_,
DifficultyInstance p_213386_2_,
SpawnReason p_213386_3_,
ILivingEntityData p_213386_4_,
CompoundNBT p_213386_5_) |
protected SoundEvent |
getAmbientSound() |
AgeableEntity |
getBreedOffspring(ServerWorld p_241840_1_,
AgeableEntity p_241840_2_) |
protected SoundEvent |
getDeathSound() |
private int |
getEatCounter() |
private boolean |
getFlag(int p_213547_1_) |
PandaEntity.Gene |
getHiddenGene() |
protected SoundEvent |
getHurtSound(DamageSource p_184601_1_) |
float |
getLieOnBackAmount(float p_213583_1_) |
PandaEntity.Gene |
getMainGene() |
private PandaEntity.Gene |
getOneOfGenesRandomly() |
float |
getRollAmount(float p_213591_1_) |
float |
getSitAmount(float p_213561_1_) |
int |
getSneezeCounter() |
int |
getUnhappyCounter() |
PandaEntity.Gene |
getVariant() |
private void |
handleEating() |
private void |
handleRoll() |
boolean |
hurt(DamageSource p_70097_1_,
float p_70097_2_) |
boolean |
isAggressive() |
boolean |
isEating() |
boolean |
isFood(ItemStack p_70877_1_) |
private boolean |
isFoodOrCake(ItemStack p_213548_1_) |
boolean |
isLazy() |
boolean |
isOnBack() |
boolean |
isPlayful() |
boolean |
isRolling() |
boolean |
isScared() |
boolean |
isSitting() |
boolean |
isSneezing() |
boolean |
isWeak() |
boolean |
isWorried() |
ActionResultType |
mobInteract(PlayerEntity p_230254_1_,
Hand p_230254_2_) |
protected void |
pickUpItem(ItemEntity p_175445_1_) |
protected void |
playStepSound(BlockPos p_180429_1_,
BlockState p_180429_2_) |
void |
readAdditionalSaveData(CompoundNBT p_70037_1_) |
protected void |
registerGoals() |
void |
roll(boolean p_213576_1_) |
void |
setAttributes() |
private void |
setEatCounter(int p_213571_1_) |
private void |
setFlag(int p_213587_1_,
boolean p_213587_2_) |
void |
setGeneFromParents(PandaEntity p_213545_1_,
PandaEntity p_213545_2_) |
void |
setHiddenGene(PandaEntity.Gene p_213541_1_) |
void |
setMainGene(PandaEntity.Gene p_213589_1_) |
void |
setOnBack(boolean p_213542_1_) |
void |
setSneezeCounter(int p_213562_1_) |
void |
setUnhappyCounter(int p_213588_1_) |
void |
sit(boolean p_213553_1_) |
void |
sneeze(boolean p_213581_1_) |
void |
tick() |
private void |
tryToSit() |
private void |
updateOnBackAnimation() |
private void |
updateRollAmount() |
private void |
updateSitAmount() |
aiStep, canFallInLove, canMate, checkAnimalSpawnRules, customServerAiStep, getAmbientSoundInterval, getExperienceReward, getInLoveTime, getLoveCause, getMyRidingOffset, getWalkTargetValue, handleEntityEvent, isInLove, removeWhenFarAway, resetLove, setInLove, setInLoveTime, spawnChildFromBreeding, usePlayerItem
ageBoundaryReached, ageUp, ageUp, canBreed, getAge, isBaby, onSyncedDataUpdated, setAge, setBaby
checkSpawnRules, followLeashSpeed, getWalkTargetValue, isPathFinding, onLeashDistance, tickLeash
ate, baseTick, canAttack, canAttackType, canBeControlledByRider, canCutCorner, canFireProjectileWeapon, canHoldItem, canPickUpLoot, canReplaceCurrentItem, canReplaceEqualItem, checkDespawn, checkMobSpawnRules, checkSpawnObstruction, convertTo, createBodyControl, createLootContext, createMobAttributes, createNavigation, dropCustomDeathLoot, dropFromLootTable, dropLeash, enchantSpawnedArmor, enchantSpawnedWeapon, equipItemIfPossible, getArmorSlots, getDefaultLootTable, getEquipmentDropChance, getEquipmentForSlot, getEquipmentSlotForItem, getHandSlots, getHeadRotSpeed, getItemBySlot, getJumpControl, getLeashHolder, getLookControl, getLootTable, getMainArm, getMaxFallDistance, getMaxHeadXRot, getMaxHeadYRot, getMaxSpawnClusterSize, getMoveControl, getNavigation, getPathfindingMalus, getRestrictCenter, getRestrictRadius, getSensing, getTarget, hasRestriction, interact, isControlledByLocalInstance, isEffectiveAi, isLeashed, isLeftHanded, isMaxGroupSizeReached, isNoAi, isPersistenceRequired, isSunBurnTick, isValidSlotForItem, isWithinRestriction, isWithinRestriction, jumpInLiquid, lookAt, onOffspringSpawnedFromEgg, playAmbientSound, playHurtSound, populateDefaultEquipmentEnchantments, populateDefaultEquipmentSlots, removeAfterChangingDimensions, requiresCustomPersistence, restrictTo, sendDebugPackets, serverAiStep, setAggressive, setCanPickUpLoot, setDelayedLeashHolderId, setDropChance, setGuaranteedDrop, setItemSlot, setItemSlotAndDropWhenKilled, setLeashedTo, setLeftHanded, setNoAi, setPathfindingMalus, setPersistenceRequired, setSlot, setSpeed, setTarget, setXxa, setYya, setZza, shouldDespawnInPeaceful, shouldPassengersInheritMalus, spawnAnim, startRiding, tickHeadTurn, updateControlFlags, wantsToPickUp
actuallyHurt, addEffect, animateHurt, areAllEffectsAmbient, attackable, blockedByShield, blockUsingShield, brainProvider, broadcastBreakEvent, broadcastBreakEvent, calculateEntityAnimation, calculateFallDamage, canAttack, canBeAffected, canBreatheUnderwater, canSee, canSpawnSoulSpeedParticle, canStandOnFluid, causeFallDamage, checkAutoSpinAttack, checkFallDamage, clearSleepingPos, completeUsingItem, createLivingAttributes, createWitherRose, curePotionEffects, decreaseAirSupply, die, doAutoAttackOnTouch, doPush, dropAllDeathLoot, dropEquipment, dropExperience, eat, forceAddEffect, getAbsorptionAmount, getActiveEffects, getActiveEffectsMap, getAddEntityPacket, getArmorCoverPercentage, getArmorValue, getArrowCount, getAttackAnim, getAttribute, getAttributeBaseValue, getAttributes, getAttributeValue, getBedOrientation, getBlockSpeedFactor, getBoundingBoxForCulling, getBrain, getCapability, getCombatTracker, getDamageAfterArmorAbsorb, getDamageAfterMagicAbsorb, getDimensions, getDismountPoses, getDrinkingSound, getEatingSound, getEffect, getEyeHeight, getFallDamageSound, getFallFlyingTicks, getFeetBlockState, getFluidFallingAdjustedMovement, getHealth, getItemInHand, getJumpPower, getKillCredit, getLastClimbablePos, getLastDamageSource, getLastHurtByMob, getLastHurtByMobTimestamp, getLastHurtMob, getLastHurtMobTimestamp, getLocalBoundsForPose, getMainHandItem, getMaxHealth, getMobType, getNoActionTime, getOffhandItem, getProjectile, getRandom, getRelativePortalPosition, getScale, getSleepingPos, getSoundVolume, getSpeed, getStandingEyeHeight, getStingerCount, getSwimAmount, getTicksUsingItem, getUsedItemHand, getUseItem, getUseItemRemainingTicks, getViewYRot, getVisibilityPercent, getVoicePitch, getWaterSlowDown, getYHeadRot, goDownInWater, handleRelativeFrictionAndCalculateMovement, hasEffect, hasItemInSlot, heal, hurtArmor, hurtCurrentlyUsedShield, increaseAirSupply, invalidateCaps, isAffectedByFluids, isAffectedByPotions, isAlive, isAlwaysExperienceDropper, isAutoSpinAttack, isBlocking, isDeadOrDying, isFallFlying, isHolding, isHolding, isImmobile, isInvertedHealAndHarm, isInWall, isPickable, isPushable, isSensitiveToWater, isSleeping, isSuppressingSlidingDownLadder, isUsingItem, isVisuallySwimming, jumpFromGround, kill, knockback, lerpHeadTo, lerpTo, lookAt, makeBrain, markHurt, onChangedBlock, onClimbable, onEffectAdded, onEffectRemoved, onEffectUpdated, onEnterCombat, onItemPickup, onLeaveCombat, onSoulSpeedBlock, outOfWorld, playBlockFallSound, playEquipSound, push, pushEntities, randomTeleport, releaseUsingItem, removeAllEffects, removeEffect, removeEffectNoUpdate, removeEffectParticles, removeSoulSpeed, resetForwardDirectionOfRelativePortalPosition, rideableUnderWater, rideTick, setAbsorptionAmount, setArrowCount, setHealth, setItemInHand, setJumping, setLastHurtByMob, setLastHurtByPlayer, setLastHurtMob, setLivingEntityFlag, setNoActionTime, setOnGround, setRecordPlayingNearby, setSleepingPos, setSprinting, setStingerCount, setYBodyRot, setYHeadRot, shouldDropExperience, shouldDropLoot, shouldRemoveSoulSpeed, shouldRiderFaceForward, shouldShowName, spawnSoulSpeedParticle, startAutoSpinAttack, startSleeping, startUsingItem, stopRiding, stopSleeping, stopUsingItem, swing, swing, take, tickDeath, tickEffects, travel, triggerItemUseEffects, tryAddSoulSpeed, updateEffectVisibility, updateInvisibilityStatus, updateSwingTime
absMoveTo, absMoveTo, acceptsFailure, acceptsSuccess, addPassenger, addTag, awardKillScore, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canAddPassenger, canBeCollidedWith, canChangeDimensions, canCollideWith, canEnterPose, canRide, canSpawnSprintParticle, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, changeDimension, changeDimension, checkAndResetForcedChunkAdditionFlag, checkAndResetUpdateChunkPos, checkInsideBlocks, clearFire, closerThan, collideBoundingBox, collideBoundingBoxHeuristically, collideBoundingBoxLegacy, copyPosition, createCommandSourceStack, createHoverEvent, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doEnchantDamageEffects, doWaterSplashEffect, ejectPassengers, equals, fillCrashReportCategory, findDimensionEntryPoint, fireImmune, getAirSupply, getAllSlots, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockStateOn, getBoundingBox, getBoundingBoxForPose, getBrightness, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getControllingPassenger, getCustomName, getDeltaMovement, getDimensionChangingDelay, getDirection, getDismountLocationForPassenger, getDisplayName, getEncodeId, getEntityData, getExitPortal, getEyeHeight, getEyeHeight, getEyeHeightAccess, getEyePosition, getEyeY, getFireImmuneTicks, getFluidHeight, getFluidJumpThreshold, getForward, getHorizontalDistanceSqr, getId, getIndirectPassengers, getLeashOffset, getLightProbePosition, getLookAngle, getMaxAirSupply, getMotionDirection, getName, getOnPos, getPacketCoordinates, getPassengers, getPassengersRidingOffset, getPermissionLevel, getPersistentData, getPickRadius, getPistonPushReaction, getPortalWaitTime, getPose, getPosition, getRandomX, getRandomY, getRandomZ, getRemainingFireTicks, getRootVehicle, getRopeHoldPosition, getRotationVector, getScoreboardName, getSelfAndPassengers, getServer, getSharedFlag, getSoundSource, getStringUUID, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTags, getTeam, getTeamColor, getType, getTypeName, getUpVector, getUUID, getVehicle, getViewScale, getViewVector, getViewXRot, getX, getX, getY, getY, getZ, getZ, handleInsidePortal, handleNetherPortal, hasCustomName, hashCode, hasIndirectPassenger, hasOnePlayerPassenger, hasPassenger, hasPassenger, hasPermissions, ignoreExplosion, interactAt, is, isAddedToWorld, isAlliedTo, isAlliedTo, isAttackable, isColliding, isCrouching, isCustomNameVisible, isDescending, isDiscrete, isEyeInFluid, isFree, isGlowing, isIgnoringBlockTriggers, isInLava, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isInWater, isInWaterOrBubble, isInWaterOrRain, isInWaterRainOrBubble, isMovementNoisy, isNoGravity, isOnFire, isOnGround, isOnPortalCooldown, isPassenger, isPassengerOfSameVehicle, isPushedByFluid, isShiftKeyDown, isSilent, isSpectator, isSprinting, isSteppingCarefully, isSuppressingBounce, isSwimming, isUnderWater, isVehicle, isVisuallyCrawling, killed, lavaHurt, lerpMotion, limitPistonMovement, load, makeFlySound, makeStuckInBlock, maybeBackOffFromEdge, mirror, move, moveRelative, moveTo, moveTo, moveTo, moveTo, moveTowardsClosestSpace, newDoubleList, newFloatList, nextStep, onAboveBubbleCol, onAddedToWorld, onInsideBlock, onInsideBubbleColumn, onlyOpCanSetNbt, onPassengerTurned, onRemovedFromWorld, pick, playerTouch, playFlySound, playSound, playSwimSound, position, positionRider, processPortalCooldown, push, reapplyPosition, refreshDimensions, remove, remove, removePassenger, removeTag, removeVehicle, repositionEntityAfterLoad, resetPos, restoreFrom, revive, rotate, save, saveAsPassenger, saveWithoutId, sendMessage, setAirSupply, setBoundingBox, setCustomName, setCustomNameVisible, setDeltaMovement, setDeltaMovement, setGlowing, setId, setInvisible, setInvulnerable, setLevel, setLocationFromBoundingbox, setNoGravity, setPacketCoordinates, setPacketCoordinates, setPortalCooldown, setPos, setPosAndOldPos, setPose, setPosRaw, setRemainingFireTicks, setRot, setSecondsOnFire, setSharedFlag, setShiftKeyDown, setSilent, setSwimming, setUUID, setViewScale, shouldBlockExplode, shouldInformAdmins, shouldRender, shouldRenderAtSqrDistance, showVehicleHealth, skipAttackInteraction, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnSprintParticle, startRiding, startSeenByPlayer, stopSeenByPlayer, teleportTo, teleportToWithTicket, thunderHit, toString, turn, unRide, updateFluidHeightAndDoFluidPushing, updateInWaterStateAndDoFluidPushing, updateSwimming
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, reviveCaps, serializeCaps
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
canBeRiddenInWater, canRiderInteract, deserializeNBT, getClassification, getEntity, getParts, getPickedResult, isMultipartEntity, serializeNBT, shouldRiderSit
getCapability
private static final DataParameter<java.lang.Integer> UNHAPPY_COUNTER
private static final DataParameter<java.lang.Integer> SNEEZE_COUNTER
private static final DataParameter<java.lang.Integer> EAT_COUNTER
private static final DataParameter<java.lang.Byte> MAIN_GENE_ID
private static final DataParameter<java.lang.Byte> HIDDEN_GENE_ID
private static final DataParameter<java.lang.Byte> DATA_ID_FLAGS
private static final EntityPredicate BREED_TARGETING
private boolean gotBamboo
private boolean didBite
public int rollCounter
private Vector3d rollDelta
private float sitAmount
private float sitAmountO
private float onBackAmount
private float onBackAmountO
private float rollAmount
private float rollAmountO
private PandaEntity.WatchGoal lookAtPlayerGoal
private static final java.util.function.Predicate<ItemEntity> PANDA_ITEMS
public PandaEntity(EntityType<? extends PandaEntity> p_i50252_1_, World p_i50252_2_)
public boolean canTakeItem(ItemStack p_213365_1_)
canTakeItem
in class MobEntity
public int getUnhappyCounter()
public void setUnhappyCounter(int p_213588_1_)
public boolean isSneezing()
public boolean isSitting()
public void sit(boolean p_213553_1_)
public boolean isOnBack()
public void setOnBack(boolean p_213542_1_)
public boolean isEating()
public void eat(boolean p_213534_1_)
private int getEatCounter()
private void setEatCounter(int p_213571_1_)
public void sneeze(boolean p_213581_1_)
public int getSneezeCounter()
public void setSneezeCounter(int p_213562_1_)
public PandaEntity.Gene getMainGene()
public void setMainGene(PandaEntity.Gene p_213589_1_)
public PandaEntity.Gene getHiddenGene()
public void setHiddenGene(PandaEntity.Gene p_213541_1_)
public boolean isRolling()
public void roll(boolean p_213576_1_)
protected void defineSynchedData()
defineSynchedData
in class AgeableEntity
private boolean getFlag(int p_213547_1_)
private void setFlag(int p_213587_1_, boolean p_213587_2_)
public void addAdditionalSaveData(CompoundNBT p_213281_1_)
addAdditionalSaveData
in class AnimalEntity
public void readAdditionalSaveData(CompoundNBT p_70037_1_)
readAdditionalSaveData
in class AnimalEntity
@Nullable public AgeableEntity getBreedOffspring(ServerWorld p_241840_1_, AgeableEntity p_241840_2_)
getBreedOffspring
in class AgeableEntity
protected void registerGoals()
registerGoals
in class MobEntity
public static AttributeModifierMap.MutableAttribute createAttributes()
public PandaEntity.Gene getVariant()
public boolean isLazy()
public boolean isWorried()
public boolean isPlayful()
public boolean isWeak()
public boolean isAggressive()
isAggressive
in class MobEntity
public boolean canBeLeashed(PlayerEntity p_184652_1_)
canBeLeashed
in class MobEntity
public boolean doHurtTarget(Entity p_70652_1_)
doHurtTarget
in class MobEntity
public boolean isScared()
private void handleEating()
private void addEatingParticles()
private void updateSitAmount()
private void updateOnBackAnimation()
private void updateRollAmount()
public float getSitAmount(float p_213561_1_)
public float getLieOnBackAmount(float p_213583_1_)
public float getRollAmount(float p_213591_1_)
private void handleRoll()
private void afterSneeze()
protected void pickUpItem(ItemEntity p_175445_1_)
pickUpItem
in class MobEntity
public boolean hurt(DamageSource p_70097_1_, float p_70097_2_)
hurt
in class AnimalEntity
@Nullable public ILivingEntityData finalizeSpawn(IServerWorld p_213386_1_, DifficultyInstance p_213386_2_, SpawnReason p_213386_3_, @Nullable ILivingEntityData p_213386_4_, @Nullable CompoundNBT p_213386_5_)
finalizeSpawn
in class AgeableEntity
public void setGeneFromParents(PandaEntity p_213545_1_, @Nullable PandaEntity p_213545_2_)
private PandaEntity.Gene getOneOfGenesRandomly()
public void setAttributes()
private void tryToSit()
public ActionResultType mobInteract(PlayerEntity p_230254_1_, Hand p_230254_2_)
mobInteract
in class AnimalEntity
@Nullable protected SoundEvent getAmbientSound()
getAmbientSound
in class MobEntity
protected void playStepSound(BlockPos p_180429_1_, BlockState p_180429_2_)
playStepSound
in class Entity
public boolean isFood(ItemStack p_70877_1_)
isFood
in class AnimalEntity
private boolean isFoodOrCake(ItemStack p_213548_1_)
@Nullable protected SoundEvent getDeathSound()
getDeathSound
in class LivingEntity
@Nullable protected SoundEvent getHurtSound(DamageSource p_184601_1_)
getHurtSound
in class LivingEntity
public boolean canPerformAction()