Class PandaEntity

All Implemented Interfaces:
CommandOutput, Nameable

public class PandaEntity
extends AnimalEntity
  • Field Details

    • ASK_FOR_BAMBOO_TICKS

      private static final TrackedData<Integer> ASK_FOR_BAMBOO_TICKS
    • SNEEZE_PROGRESS

      private static final TrackedData<Integer> SNEEZE_PROGRESS
    • EATING_TICKS

      private static final TrackedData<Integer> EATING_TICKS
    • MAIN_GENE

      private static final TrackedData<Byte> MAIN_GENE
    • HIDDEN_GENE

      private static final TrackedData<Byte> HIDDEN_GENE
    • PANDA_FLAGS

      private static final TrackedData<Byte> PANDA_FLAGS
    • ASK_FOR_BAMBOO_TARGET

      private static final TargetPredicate ASK_FOR_BAMBOO_TARGET
    • IS_FOOD

      private static final Predicate<ItemEntity> IS_FOOD
    • shouldGetRevenge

      private boolean shouldGetRevenge
    • shouldAttack

      private boolean shouldAttack
    • playingTicks

      public int playingTicks
    • playingJump

      private Vec3d playingJump
    • scaredAnimationProgress

      private float scaredAnimationProgress
    • lastScaredAnimationProgress

      private float lastScaredAnimationProgress
    • lieOnBackAnimationProgress

      private float lieOnBackAnimationProgress
    • lastLieOnBackAnimationProgress

      private float lastLieOnBackAnimationProgress
    • rollOverAnimationProgress

      private float rollOverAnimationProgress
    • lastRollOverAnimationProgress

      private float lastRollOverAnimationProgress
    • lookAtPlayerGoal

      private PandaEntity.LookAtEntityGoal lookAtPlayerGoal
  • Constructor Details

  • Method Details

    • canEquip

      public boolean canEquip​(ItemStack stack)
      Overrides:
      canEquip in class MobEntity
    • getAskForBambooTicks

      public int getAskForBambooTicks()
    • setAskForBambooTicks

      public void setAskForBambooTicks​(int askForBambooTicks)
    • isSneezing

      public boolean isSneezing()
    • isScared

      public boolean isScared()
    • setScared

      public void setScared​(boolean scared)
    • isLyingOnBack

      public boolean isLyingOnBack()
    • setLyingOnBack

      public void setLyingOnBack​(boolean lyingOnBack)
    • isEating

      public boolean isEating()
    • setEating

      public void setEating​(boolean eating)
    • getEatingTicks

      private int getEatingTicks()
    • setEatingTicks

      private void setEatingTicks​(int eatingTicks)
    • setSneezing

      public void setSneezing​(boolean sneezing)
    • getSneezeProgress

      public int getSneezeProgress()
    • setSneezeProgress

      public void setSneezeProgress​(int sneezeProgress)
    • getMainGene

      public PandaEntity.Gene getMainGene()
    • setMainGene

      public void setMainGene​(PandaEntity.Gene gene)
    • getHiddenGene

      public PandaEntity.Gene getHiddenGene()
    • setHiddenGene

      public void setHiddenGene​(PandaEntity.Gene gene)
    • isPlaying

      public boolean isPlaying()
    • setPlaying

      public void setPlaying​(boolean playing)
    • initDataTracker

      protected void initDataTracker()
      Overrides:
      initDataTracker in class PassiveEntity
    • hasPandaFlag

      private boolean hasPandaFlag​(int bitmask)
    • setPandaFlag

      private void setPandaFlag​(int mask, boolean value)
    • writeCustomDataToTag

      public void writeCustomDataToTag​(CompoundTag tag)
      Overrides:
      writeCustomDataToTag in class AnimalEntity
    • readCustomDataFromTag

      public void readCustomDataFromTag​(CompoundTag tag)
      Overrides:
      readCustomDataFromTag in class AnimalEntity
    • createChild

      @Nullable public PassiveEntity createChild​(ServerWorld world, PassiveEntity entity)
      Specified by:
      createChild in class PassiveEntity
    • initGoals

      protected void initGoals()
      Overrides:
      initGoals in class MobEntity
    • createPandaAttributes

      public static DefaultAttributeContainer.Builder createPandaAttributes()
    • getProductGene

      public PandaEntity.Gene getProductGene()
    • isLazy

      public boolean isLazy()
    • isWorried

      public boolean isWorried()
    • isPlayful

      public boolean isPlayful()
    • isWeak

      public boolean isWeak()
    • isAttacking

      public boolean isAttacking()
      Overrides:
      isAttacking in class MobEntity
    • canBeLeashedBy

      public boolean canBeLeashedBy​(PlayerEntity player)
      Overrides:
      canBeLeashedBy in class MobEntity
    • tryAttack

      public boolean tryAttack​(Entity target)
      Overrides:
      tryAttack in class MobEntity
    • tick

      public void tick()
      Overrides:
      tick in class MobEntity
    • isScaredByThunderstorm

      public boolean isScaredByThunderstorm()
    • updateEatingAnimation

      private void updateEatingAnimation()
    • playEatingAnimation

      private void playEatingAnimation()
    • updateScaredAnimation

      private void updateScaredAnimation()
    • updateLieOnBackAnimation

      private void updateLieOnBackAnimation()
    • updateRollOverAnimation

      private void updateRollOverAnimation()
    • getScaredAnimationProgress

      @Environment(CLIENT) public float getScaredAnimationProgress​(float tickDelta)
    • getLieOnBackAnimationProgress

      @Environment(CLIENT) public float getLieOnBackAnimationProgress​(float tickDelta)
    • getRollOverAnimationProgress

      @Environment(CLIENT) public float getRollOverAnimationProgress​(float tickDelta)
    • updatePlaying

      private void updatePlaying()
    • sneeze

      private void sneeze()
    • loot

      protected void loot​(ItemEntity item)
      Overrides:
      loot in class MobEntity
    • damage

      public boolean damage​(DamageSource source, float amount)
      Overrides:
      damage in class AnimalEntity
    • initialize

      @Nullable public EntityData initialize​(ServerWorldAccess world, LocalDifficulty difficulty, SpawnReason spawnReason, @Nullable EntityData entityData, @Nullable CompoundTag entityTag)
      Overrides:
      initialize in class PassiveEntity
    • initGenes

      public void initGenes​(PandaEntity mother, @Nullable PandaEntity father)
    • getRandomGene

      private PandaEntity.Gene getRandomGene()
    • resetAttributes

      public void resetAttributes()
    • stop

      private void stop()
    • interactMob

      public ActionResult interactMob​(PlayerEntity player, Hand hand)
      Overrides:
      interactMob in class AnimalEntity
    • getAmbientSound

      @Nullable protected SoundEvent getAmbientSound()
      Overrides:
      getAmbientSound in class MobEntity
    • playStepSound

      protected void playStepSound​(BlockPos pos, BlockState state)
      Overrides:
      playStepSound in class Entity
    • isBreedingItem

      public boolean isBreedingItem​(ItemStack stack)
      Overrides:
      isBreedingItem in class AnimalEntity
    • canEat

      private boolean canEat​(ItemStack stack)
    • getDeathSound

      @Nullable protected SoundEvent getDeathSound()
      Overrides:
      getDeathSound in class LivingEntity
    • getHurtSound

      @Nullable protected SoundEvent getHurtSound​(DamageSource source)
      Overrides:
      getHurtSound in class LivingEntity
    • isIdle

      public boolean isIdle()