Class PandaEntity

All Implemented Interfaces:
ICommandSource, INameable, ICapabilityProvider, ICapabilitySerializable<CompoundNBT>, IForgeEntity, INBTSerializable<CompoundNBT>

public class PandaEntity extends AnimalEntity
  • Field Details

    • UNHAPPY_COUNTER

      private static final DataParameter<Integer> UNHAPPY_COUNTER
    • SNEEZE_COUNTER

      private static final DataParameter<Integer> SNEEZE_COUNTER
    • EAT_COUNTER

      private static final DataParameter<Integer> EAT_COUNTER
    • MAIN_GENE_ID

      private static final DataParameter<Byte> MAIN_GENE_ID
    • HIDDEN_GENE_ID

      private static final DataParameter<Byte> HIDDEN_GENE_ID
    • DATA_ID_FLAGS

      private static final DataParameter<Byte> DATA_ID_FLAGS
    • BREED_TARGETING

      private static final EntityPredicate BREED_TARGETING
    • gotBamboo

      private boolean gotBamboo
    • didBite

      private boolean didBite
    • rollCounter

      public int rollCounter
    • rollDelta

      private Vector3d rollDelta
    • sitAmount

      private float sitAmount
    • sitAmountO

      private float sitAmountO
    • onBackAmount

      private float onBackAmount
    • onBackAmountO

      private float onBackAmountO
    • rollAmount

      private float rollAmount
    • rollAmountO

      private float rollAmountO
    • lookAtPlayerGoal

      private PandaEntity.WatchGoal lookAtPlayerGoal
    • PANDA_ITEMS

      private static final Predicate<ItemEntity> PANDA_ITEMS
  • Constructor Details

  • Method Details

    • canTakeItem

      public boolean canTakeItem(ItemStack p_213365_1_)
      Overrides:
      canTakeItem in class MobEntity
    • getUnhappyCounter

      public int getUnhappyCounter()
    • setUnhappyCounter

      public void setUnhappyCounter(int p_213588_1_)
    • isSneezing

      public boolean isSneezing()
    • isSitting

      public boolean isSitting()
    • sit

      public void sit(boolean p_213553_1_)
    • isOnBack

      public boolean isOnBack()
    • setOnBack

      public void setOnBack(boolean p_213542_1_)
    • isEating

      public boolean isEating()
    • eat

      public void eat(boolean p_213534_1_)
    • getEatCounter

      private int getEatCounter()
    • setEatCounter

      private void setEatCounter(int p_213571_1_)
    • sneeze

      public void sneeze(boolean p_213581_1_)
    • getSneezeCounter

      public int getSneezeCounter()
    • setSneezeCounter

      public void setSneezeCounter(int p_213562_1_)
    • getMainGene

      public PandaEntity.Gene getMainGene()
    • setMainGene

      public void setMainGene(PandaEntity.Gene p_213589_1_)
    • getHiddenGene

      public PandaEntity.Gene getHiddenGene()
    • setHiddenGene

      public void setHiddenGene(PandaEntity.Gene p_213541_1_)
    • isRolling

      public boolean isRolling()
    • roll

      public void roll(boolean p_213576_1_)
    • defineSynchedData

      protected void defineSynchedData()
      Overrides:
      defineSynchedData in class AgeableEntity
    • getFlag

      private boolean getFlag(int p_213547_1_)
    • setFlag

      private void setFlag(int p_213587_1_, boolean p_213587_2_)
    • addAdditionalSaveData

      public void addAdditionalSaveData(CompoundNBT p_213281_1_)
      Overrides:
      addAdditionalSaveData in class AnimalEntity
    • readAdditionalSaveData

      public void readAdditionalSaveData(CompoundNBT p_70037_1_)
      Overrides:
      readAdditionalSaveData in class AnimalEntity
    • getBreedOffspring

      @Nullable public AgeableEntity getBreedOffspring(ServerWorld p_241840_1_, AgeableEntity p_241840_2_)
      Specified by:
      getBreedOffspring in class AgeableEntity
    • registerGoals

      protected void registerGoals()
      Overrides:
      registerGoals in class MobEntity
    • createAttributes

      public static AttributeModifierMap.MutableAttribute createAttributes()
    • getVariant

      public PandaEntity.Gene getVariant()
    • isLazy

      public boolean isLazy()
    • isWorried

      public boolean isWorried()
    • isPlayful

      public boolean isPlayful()
    • isWeak

      public boolean isWeak()
    • isAggressive

      public boolean isAggressive()
      Overrides:
      isAggressive in class MobEntity
    • canBeLeashed

      public boolean canBeLeashed(PlayerEntity p_184652_1_)
      Overrides:
      canBeLeashed in class MobEntity
    • doHurtTarget

      public boolean doHurtTarget(Entity p_70652_1_)
      Overrides:
      doHurtTarget in class MobEntity
    • tick

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

      public boolean isScared()
    • handleEating

      private void handleEating()
    • addEatingParticles

      private void addEatingParticles()
    • updateSitAmount

      private void updateSitAmount()
    • updateOnBackAnimation

      private void updateOnBackAnimation()
    • updateRollAmount

      private void updateRollAmount()
    • getSitAmount

      public float getSitAmount(float p_213561_1_)
    • getLieOnBackAmount

      public float getLieOnBackAmount(float p_213583_1_)
    • getRollAmount

      public float getRollAmount(float p_213591_1_)
    • handleRoll

      private void handleRoll()
    • afterSneeze

      private void afterSneeze()
    • pickUpItem

      protected void pickUpItem(ItemEntity p_175445_1_)
      Overrides:
      pickUpItem in class MobEntity
    • hurt

      public boolean hurt(DamageSource p_70097_1_, float p_70097_2_)
      Overrides:
      hurt in class AnimalEntity
    • finalizeSpawn

      @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_)
      Overrides:
      finalizeSpawn in class AgeableEntity
    • setGeneFromParents

      public void setGeneFromParents(PandaEntity p_213545_1_, @Nullable PandaEntity p_213545_2_)
    • getOneOfGenesRandomly

      private PandaEntity.Gene getOneOfGenesRandomly()
    • setAttributes

      public void setAttributes()
    • tryToSit

      private void tryToSit()
    • mobInteract

      public ActionResultType mobInteract(PlayerEntity p_230254_1_, Hand p_230254_2_)
      Overrides:
      mobInteract in class AnimalEntity
    • getAmbientSound

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

      protected void playStepSound(BlockPos p_180429_1_, BlockState p_180429_2_)
      Overrides:
      playStepSound in class Entity
    • isFood

      public boolean isFood(ItemStack p_70877_1_)
      Overrides:
      isFood in class AnimalEntity
    • isFoodOrCake

      private boolean isFoodOrCake(ItemStack p_213548_1_)
    • getDeathSound

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

      @Nullable protected SoundEvent getHurtSound(DamageSource p_184601_1_)
      Overrides:
      getHurtSound in class LivingEntity
    • canPerformAction

      public boolean canPerformAction()