Class Panda

All Implemented Interfaces:
CommandSource, Attackable, Targeting, EntityAccess, Nameable, ICapabilityProvider, ICapabilityProviderImpl<Entity>, ICapabilitySerializable<CompoundTag>, IForgeEntity, IForgeLivingEntity, INBTSerializable<CompoundTag>

public class Panda extends Animal
  • Field Details

  • Constructor Details

  • Method Details

    • canTakeItem

      public boolean canTakeItem(ItemStack p_29146_)
      Overrides:
      canTakeItem in class Mob
    • getUnhappyCounter

      public int getUnhappyCounter()
    • setUnhappyCounter

      public void setUnhappyCounter(int p_29207_)
    • isSneezing

      public boolean isSneezing()
    • isSitting

      public boolean isSitting()
    • sit

      public void sit(boolean p_29209_)
    • isOnBack

      public boolean isOnBack()
    • setOnBack

      public void setOnBack(boolean p_29213_)
    • isEating

      public boolean isEating()
    • eat

      public void eat(boolean p_29217_)
    • getEatCounter

      private int getEatCounter()
    • setEatCounter

      private void setEatCounter(int p_29215_)
    • sneeze

      public void sneeze(boolean p_29221_)
    • getSneezeCounter

      public int getSneezeCounter()
    • setSneezeCounter

      public void setSneezeCounter(int p_29211_)
    • getMainGene

      public Panda.Gene getMainGene()
    • setMainGene

      public void setMainGene(Panda.Gene p_29100_)
    • getHiddenGene

      public Panda.Gene getHiddenGene()
    • setHiddenGene

      public void setHiddenGene(Panda.Gene p_29117_)
    • isRolling

      public boolean isRolling()
    • roll

      public void roll(boolean p_29223_)
    • defineSynchedData

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

      private boolean getFlag(int p_29219_)
    • setFlag

      private void setFlag(int p_29135_, boolean p_29136_)
    • addAdditionalSaveData

      public void addAdditionalSaveData(CompoundTag p_29129_)
      Overrides:
      addAdditionalSaveData in class Animal
    • readAdditionalSaveData

      public void readAdditionalSaveData(CompoundTag p_29115_)
      Overrides:
      readAdditionalSaveData in class Animal
    • getBreedOffspring

      @Nullable public AgeableMob getBreedOffspring(ServerLevel p_148967_, AgeableMob p_148968_)
      Specified by:
      getBreedOffspring in class AgeableMob
    • registerGoals

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

      public static AttributeSupplier.Builder createAttributes()
    • getVariant

      public Panda.Gene getVariant()
    • isLazy

      public boolean isLazy()
    • isWorried

      public boolean isWorried()
    • isPlayful

      public boolean isPlayful()
    • isBrown

      public boolean isBrown()
    • isWeak

      public boolean isWeak()
    • isAggressive

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

      public boolean canBeLeashed(Player p_29107_)
      Overrides:
      canBeLeashed in class Mob
    • doHurtTarget

      public boolean doHurtTarget(Entity p_29091_)
      Overrides:
      doHurtTarget in class Mob
    • tick

      public void tick()
      Overrides:
      tick in class Mob
    • 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_29225_)
    • getLieOnBackAmount

      public float getLieOnBackAmount(float p_29227_)
    • getRollAmount

      public float getRollAmount(float p_29089_)
    • handleRoll

      private void handleRoll()
    • afterSneeze

      private void afterSneeze()
    • pickUpItem

      protected void pickUpItem(ItemEntity p_29121_)
      Overrides:
      pickUpItem in class Mob
    • hurt

      public boolean hurt(DamageSource p_29097_, float p_29098_)
      Overrides:
      hurt in class Animal
    • finalizeSpawn

      @Nullable public SpawnGroupData finalizeSpawn(ServerLevelAccessor p_29109_, DifficultyInstance p_29110_, MobSpawnType p_29111_, @Nullable SpawnGroupData p_29112_, @Nullable CompoundTag p_29113_)
      Description copied from class: Mob
      Forge: Override-Only, call via ForgeEventFactory.onFinalizeSpawn.
      Overrides are allowed. Do not wrap super calls within override (as that will cause stack overflows).
      Vanilla calls are replaced with a transformer, and are not visible in source.

      Be certain to either call super.finalizeSpawn or set the Mob.spawnType field from within your override.

      Overrides:
      finalizeSpawn in class AgeableMob
    • setGeneFromParents

      public void setGeneFromParents(Panda p_29104_, @Nullable Panda p_29105_)
    • getOneOfGenesRandomly

      private Panda.Gene getOneOfGenesRandomly()
    • setAttributes

      public void setAttributes()
    • tryToSit

      void tryToSit()
    • mobInteract

      public InteractionResult mobInteract(Player p_29123_, InteractionHand p_29124_)
      Overrides:
      mobInteract in class Animal
    • getAmbientSound

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

      protected void playStepSound(BlockPos p_29126_, BlockState p_29127_)
      Overrides:
      playStepSound in class Entity
    • isFood

      public boolean isFood(ItemStack p_29192_)
      Overrides:
      isFood in class Animal
    • isFoodOrCake

      private boolean isFoodOrCake(ItemStack p_29196_)
    • getDeathSound

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

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

      public boolean canPerformAction()