Class PolarBearEntity

All Implemented Interfaces:
Attackable, DataTracked, EquipmentHolder, Leashable, Angerable, Targeter, ScoreHolder, Nameable, EntityLike

public class PolarBearEntity extends AnimalEntity implements Angerable
Mappings:
Namespace Name
named net/minecraft/entity/passive/PolarBearEntity
intermediary net/minecraft/class_1456
official cio
  • Field Details

    • WARNING

      private static final TrackedData<Boolean> WARNING
      Mappings:
      Namespace Name Mixin selector
      named WARNING Lnet/minecraft/entity/passive/PolarBearEntity;WARNING:Lnet/minecraft/entity/data/TrackedData;
      intermediary field_6840 Lnet/minecraft/class_1456;field_6840:Lnet/minecraft/class_2940;
      official bZ Lcio;bZ:Lalc;
    • field_30352

      private static final float field_30352
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_30352 Lnet/minecraft/entity/passive/PolarBearEntity;field_30352:F
      intermediary field_30352 Lnet/minecraft/class_1456;field_30352:F
      official ca Lcio;ca:F
    • ANGER_TIME_RANGE

      private static final UniformIntProvider ANGER_TIME_RANGE
      Mappings:
      Namespace Name Mixin selector
      named ANGER_TIME_RANGE Lnet/minecraft/entity/passive/PolarBearEntity;ANGER_TIME_RANGE:Lnet/minecraft/util/math/intprovider/UniformIntProvider;
      intermediary field_25369 Lnet/minecraft/class_1456;field_25369:Lnet/minecraft/class_6019;
      official cf Lcio;cf:Lbst;
    • lastWarningAnimationProgress

      private float lastWarningAnimationProgress
      Mappings:
      Namespace Name Mixin selector
      named lastWarningAnimationProgress Lnet/minecraft/entity/passive/PolarBearEntity;lastWarningAnimationProgress:F
      intermediary field_6838 Lnet/minecraft/class_1456;field_6838:F
      official cb Lcio;cb:F
    • warningAnimationProgress

      private float warningAnimationProgress
      Mappings:
      Namespace Name Mixin selector
      named warningAnimationProgress Lnet/minecraft/entity/passive/PolarBearEntity;warningAnimationProgress:F
      intermediary field_6837 Lnet/minecraft/class_1456;field_6837:F
      official cd Lcio;cd:F
    • warningSoundCooldown

      private int warningSoundCooldown
      Mappings:
      Namespace Name Mixin selector
      named warningSoundCooldown Lnet/minecraft/entity/passive/PolarBearEntity;warningSoundCooldown:I
      intermediary field_6839 Lnet/minecraft/class_1456;field_6839:I
      official ce Lcio;ce:I
    • angerTime

      private int angerTime
      Mappings:
      Namespace Name Mixin selector
      named angerTime Lnet/minecraft/entity/passive/PolarBearEntity;angerTime:I
      intermediary field_25370 Lnet/minecraft/class_1456;field_25370:I
      official cg Lcio;cg:I
    • angryAt

      @Nullable private @Nullable UUID angryAt
      Mappings:
      Namespace Name Mixin selector
      named angryAt Lnet/minecraft/entity/passive/PolarBearEntity;angryAt:Ljava/util/UUID;
      intermediary field_25368 Lnet/minecraft/class_1456;field_25368:Ljava/util/UUID;
      official ch Lcio;ch:Ljava/util/UUID;
  • Constructor Details

    • PolarBearEntity

      public PolarBearEntity(EntityType<? extends PolarBearEntity> type, World world)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/Entity;<init>(Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/World;)V
      intermediary <init> Lnet/minecraft/class_1297;<init>(Lnet/minecraft/class_1299;Lnet/minecraft/class_1937;)V
      official <init> Lbvj;<init>(Lbvq;Ldhh;)V
  • Method Details

    • createChild

      @Nullable public @Nullable PassiveEntity createChild(ServerWorld world, PassiveEntity entity)
      Specified by:
      createChild in class PassiveEntity
      Mappings:
      Namespace Name Mixin selector
      named createChild Lnet/minecraft/entity/passive/PassiveEntity;createChild(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/PassiveEntity;)Lnet/minecraft/entity/passive/PassiveEntity;
      intermediary method_5613 Lnet/minecraft/class_1296;method_5613(Lnet/minecraft/class_3218;Lnet/minecraft/class_1296;)Lnet/minecraft/class_1296;
      official a Lbva;a(Lash;Lbva;)Lbva;
    • isBreedingItem

      public boolean isBreedingItem(ItemStack stack)
      Specified by:
      isBreedingItem in class AnimalEntity
      Mappings:
      Namespace Name Mixin selector
      named isBreedingItem Lnet/minecraft/entity/passive/AnimalEntity;isBreedingItem(Lnet/minecraft/item/ItemStack;)Z
      intermediary method_6481 Lnet/minecraft/class_1429;method_6481(Lnet/minecraft/class_1799;)Z
      official j Lchw;j(Lcxo;)Z
    • initGoals

      protected void initGoals()
      Overrides:
      initGoals in class MobEntity
      Mappings:
      Namespace Name Mixin selector
      named initGoals Lnet/minecraft/entity/mob/MobEntity;initGoals()V
      intermediary method_5959 Lnet/minecraft/class_1308;method_5959()V
      official B Lbwh;B()V
    • createPolarBearAttributes

      public static DefaultAttributeContainer.Builder createPolarBearAttributes()
      Mappings:
      Namespace Name Mixin selector
      named createPolarBearAttributes Lnet/minecraft/entity/passive/PolarBearEntity;createPolarBearAttributes()Lnet/minecraft/entity/attribute/DefaultAttributeContainer$Builder;
      intermediary method_26891 Lnet/minecraft/class_1456;method_26891()Lnet/minecraft/class_5132$class_5133;
      official p Lcio;p()Lbxm$a;
    • canSpawn

      public static boolean canSpawn(EntityType<PolarBearEntity> type, WorldAccess world, SpawnReason spawnReason, BlockPos pos, Random random)
      Mappings:
      Namespace Name Mixin selector
      named canSpawn Lnet/minecraft/entity/passive/PolarBearEntity;canSpawn(Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/WorldAccess;Lnet/minecraft/entity/SpawnReason;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/random/Random;)Z
      intermediary method_20668 Lnet/minecraft/class_1456;method_20668(Lnet/minecraft/class_1299;Lnet/minecraft/class_1936;Lnet/minecraft/class_3730;Lnet/minecraft/class_2338;Lnet/minecraft/class_5819;)Z
      official c Lcio;c(Lbvq;Ldhi;Lbvp;Ljh;Lbam;)Z
    • readCustomDataFromNbt

      public void readCustomDataFromNbt(NbtCompound nbt)
      Reads custom data from nbt. Subclasses have to implement this.

      NBT is a storage format; therefore, a data from NBT is loaded to an entity instance's fields, which are used for other operations instead of the NBT. The data is written back to NBT when saving the entity.

      nbt might not have all expected keys, or might have a key whose value does not meet the requirement (such as the type or the range). This method should fall back to a reasonable default value instead of throwing an exception.

      Overrides:
      readCustomDataFromNbt in class AnimalEntity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named readCustomDataFromNbt Lnet/minecraft/entity/Entity;readCustomDataFromNbt(Lnet/minecraft/nbt/NbtCompound;)V
      intermediary method_5749 Lnet/minecraft/class_1297;method_5749(Lnet/minecraft/class_2487;)V
      official a Lbvj;a(Lux;)V
    • writeCustomDataToNbt

      public void writeCustomDataToNbt(NbtCompound nbt)
      Writes custom data to nbt. Subclasses have to implement this.

      NBT is a storage format; therefore, a data from NBT is loaded to an entity instance's fields, which are used for other operations instead of the NBT. The data is written back to NBT when saving the entity.

      Overrides:
      writeCustomDataToNbt in class AnimalEntity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named writeCustomDataToNbt Lnet/minecraft/entity/Entity;writeCustomDataToNbt(Lnet/minecraft/nbt/NbtCompound;)V
      intermediary method_5652 Lnet/minecraft/class_1297;method_5652(Lnet/minecraft/class_2487;)V
      official b Lbvj;b(Lux;)V
    • chooseRandomAngerTime

      public void chooseRandomAngerTime()
      Specified by:
      chooseRandomAngerTime in interface Angerable
      Mappings:
      Namespace Name Mixin selector
      named chooseRandomAngerTime Lnet/minecraft/entity/mob/Angerable;chooseRandomAngerTime()V
      intermediary method_29509 Lnet/minecraft/class_5354;method_29509()V
      official c Lbwk;c()V
    • setAngerTime

      public void setAngerTime(int angerTime)
      Specified by:
      setAngerTime in interface Angerable
      Mappings:
      Namespace Name Mixin selector
      named setAngerTime Lnet/minecraft/entity/mob/Angerable;setAngerTime(I)V
      intermediary method_29514 Lnet/minecraft/class_5354;method_29514(I)V
      official a Lbwk;a(I)V
    • getAngerTime

      public int getAngerTime()
      Specified by:
      getAngerTime in interface Angerable
      Mappings:
      Namespace Name Mixin selector
      named getAngerTime Lnet/minecraft/entity/mob/Angerable;getAngerTime()I
      intermediary method_29507 Lnet/minecraft/class_5354;method_29507()I
      official a Lbwk;a()I
    • setAngryAt

      public void setAngryAt(@Nullable @Nullable UUID angryAt)
      Specified by:
      setAngryAt in interface Angerable
      Mappings:
      Namespace Name Mixin selector
      named setAngryAt Lnet/minecraft/entity/mob/Angerable;setAngryAt(Ljava/util/UUID;)V
      intermediary method_29513 Lnet/minecraft/class_5354;method_29513(Ljava/util/UUID;)V
      official a Lbwk;a(Ljava/util/UUID;)V
    • getAngryAt

      @Nullable public @Nullable UUID getAngryAt()
      Specified by:
      getAngryAt in interface Angerable
      Mappings:
      Namespace Name Mixin selector
      named getAngryAt Lnet/minecraft/entity/mob/Angerable;getAngryAt()Ljava/util/UUID;
      intermediary method_29508 Lnet/minecraft/class_5354;method_29508()Ljava/util/UUID;
      official b Lbwk;b()Ljava/util/UUID;
    • getAmbientSound

      protected SoundEvent getAmbientSound()
      Overrides:
      getAmbientSound in class MobEntity
      Mappings:
      Namespace Name Mixin selector
      named getAmbientSound Lnet/minecraft/entity/mob/MobEntity;getAmbientSound()Lnet/minecraft/sound/SoundEvent;
      intermediary method_5994 Lnet/minecraft/class_1308;method_5994()Lnet/minecraft/class_3414;
      official u Lbwh;u()Laxe;
    • getHurtSound

      protected SoundEvent getHurtSound(DamageSource source)
      Overrides:
      getHurtSound in class LivingEntity
      Mappings:
      Namespace Name Mixin selector
      named getHurtSound Lnet/minecraft/entity/LivingEntity;getHurtSound(Lnet/minecraft/entity/damage/DamageSource;)Lnet/minecraft/sound/SoundEvent;
      intermediary method_6011 Lnet/minecraft/class_1309;method_6011(Lnet/minecraft/class_1282;)Lnet/minecraft/class_3414;
      official e Lbwf;e(Lbtz;)Laxe;
    • getDeathSound

      protected SoundEvent getDeathSound()
      Overrides:
      getDeathSound in class LivingEntity
      Mappings:
      Namespace Name Mixin selector
      named getDeathSound Lnet/minecraft/entity/LivingEntity;getDeathSound()Lnet/minecraft/sound/SoundEvent;
      intermediary method_6002 Lnet/minecraft/class_1309;method_6002()Lnet/minecraft/class_3414;
      official o_ Lbwf;o_()Laxe;
    • playStepSound

      protected void playStepSound(BlockPos pos, BlockState state)
      Overrides:
      playStepSound in class Entity
      Mappings:
      Namespace Name Mixin selector
      named playStepSound Lnet/minecraft/entity/Entity;playStepSound(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
      intermediary method_5712 Lnet/minecraft/class_1297;method_5712(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V
      official b Lbvj;b(Ljh;Ldxu;)V
    • playWarningSound

      protected void playWarningSound()
      Mappings:
      Namespace Name Mixin selector
      named playWarningSound Lnet/minecraft/entity/passive/PolarBearEntity;playWarningSound()V
      intermediary method_6602 Lnet/minecraft/class_1456;method_6602()V
      official t Lcio;t()V
    • initDataTracker

      protected void initDataTracker(DataTracker.Builder builder)
      Initializes data tracker.
      Overrides:
      initDataTracker in class PassiveEntity
      API Note:
      Subclasses should override this and add to the builder any data that needs to be tracked.
      Mappings:
      Namespace Name Mixin selector
      named initDataTracker Lnet/minecraft/entity/Entity;initDataTracker(Lnet/minecraft/entity/data/DataTracker$Builder;)V
      intermediary method_5693 Lnet/minecraft/class_1297;method_5693(Lnet/minecraft/class_2945$class_9222;)V
      official a Lbvj;a(Lalg$a;)V
    • tick

      public void tick()
      Ticks this entity.
      Overrides:
      tick in class MobEntity
      See Also:
      API Note:
      This can be overridden to add additional logics. super.tick(); should be called in those cases.
      Implementation Note:
      By default, this delegates all logics to MobEntity.baseTick().
      Mappings:
      Namespace Name Mixin selector
      named tick Lnet/minecraft/entity/Entity;tick()V
      intermediary method_5773 Lnet/minecraft/class_1297;method_5773()V
      official h Lbvj;h()V
    • getBaseDimensions

      public EntityDimensions getBaseDimensions(EntityPose pose)
      Overrides:
      getBaseDimensions in class LivingEntity
      Mappings:
      Namespace Name Mixin selector
      named getBaseDimensions Lnet/minecraft/entity/LivingEntity;getBaseDimensions(Lnet/minecraft/entity/EntityPose;)Lnet/minecraft/entity/EntityDimensions;
      intermediary method_55694 Lnet/minecraft/class_1309;method_55694(Lnet/minecraft/class_4050;)Lnet/minecraft/class_4048;
      official e Lbwf;e(Lbwr;)Lbvm;
    • isWarning

      public boolean isWarning()
      Mappings:
      Namespace Name Mixin selector
      named isWarning Lnet/minecraft/entity/passive/PolarBearEntity;isWarning()Z
      intermediary method_6600 Lnet/minecraft/class_1456;method_6600()Z
      official x Lcio;x()Z
    • setWarning

      public void setWarning(boolean warning)
      Mappings:
      Namespace Name Mixin selector
      named setWarning Lnet/minecraft/entity/passive/PolarBearEntity;setWarning(Z)V
      intermediary method_6603 Lnet/minecraft/class_1456;method_6603(Z)V
      official x Lcio;x(Z)V
    • getWarningAnimationProgress

      public float getWarningAnimationProgress(float tickDelta)
      Mappings:
      Namespace Name Mixin selector
      named getWarningAnimationProgress Lnet/minecraft/entity/passive/PolarBearEntity;getWarningAnimationProgress(F)F
      intermediary method_6601 Lnet/minecraft/class_1456;method_6601(F)F
      official J Lcio;J(F)F
    • getBaseMovementSpeedMultiplier

      protected float getBaseMovementSpeedMultiplier()
      Overrides:
      getBaseMovementSpeedMultiplier in class LivingEntity
      Mappings:
      Namespace Name Mixin selector
      named getBaseMovementSpeedMultiplier Lnet/minecraft/entity/LivingEntity;getBaseMovementSpeedMultiplier()F
      intermediary method_6120 Lnet/minecraft/class_1309;method_6120()F
      official fm Lbwf;fm()F
    • initialize

      public EntityData initialize(ServerWorldAccess world, LocalDifficulty difficulty, SpawnReason spawnReason, @Nullable @Nullable EntityData entityData)
      Overrides:
      initialize in class PassiveEntity
      Mappings:
      Namespace Name Mixin selector
      named initialize Lnet/minecraft/entity/mob/MobEntity;initialize(Lnet/minecraft/world/ServerWorldAccess;Lnet/minecraft/world/LocalDifficulty;Lnet/minecraft/entity/SpawnReason;Lnet/minecraft/entity/EntityData;)Lnet/minecraft/entity/EntityData;
      intermediary method_5943 Lnet/minecraft/class_1308;method_5943(Lnet/minecraft/class_5425;Lnet/minecraft/class_1266;Lnet/minecraft/class_3730;Lnet/minecraft/class_1315;)Lnet/minecraft/class_1315;
      official a Lbwh;a(Ldhy;Lbtg;Lbvp;Lbwy;)Lbwy;