Class SlimeEntity

All Implemented Interfaces:
Attackable, DataTracked, EquipmentHolder, Monster, Targeter, ScoreHolder, CommandOutput, Nameable, EntityLike
Direct Known Subclasses:
MagmaCubeEntity

public class SlimeEntity extends MobEntity implements Monster
Mappings:
Namespace Name
named net/minecraft/entity/mob/SlimeEntity
intermediary net/minecraft/class_1621
official cka
  • Field Details

    • SLIME_SIZE

      private static final TrackedData<Integer> SLIME_SIZE
      Mappings:
      Namespace Name Mixin selector
      named SLIME_SIZE Lnet/minecraft/entity/mob/SlimeEntity;SLIME_SIZE:Lnet/minecraft/entity/data/TrackedData;
      intermediary field_7390 Lnet/minecraft/class_1621;field_7390:Lnet/minecraft/class_2940;
      official cb Lcka;cb:Lajp;
    • MIN_SIZE

      public static final int MIN_SIZE
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named MIN_SIZE Lnet/minecraft/entity/mob/SlimeEntity;MIN_SIZE:I
      intermediary field_30496 Lnet/minecraft/class_1621;field_30496:I
      official b Lcka;b:I
    • MAX_SIZE

      public static final int MAX_SIZE
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named MAX_SIZE Lnet/minecraft/entity/mob/SlimeEntity;MAX_SIZE:I
      intermediary field_30497 Lnet/minecraft/class_1621;field_30497:I
      official c Lcka;c:I
    • field_50136

      public static final int field_50136
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_50136 Lnet/minecraft/entity/mob/SlimeEntity;field_50136:I
      intermediary field_50136 Lnet/minecraft/class_1621;field_50136:I
      official d Lcka;d:I
    • targetStretch

      public float targetStretch
      Mappings:
      Namespace Name Mixin selector
      named targetStretch Lnet/minecraft/entity/mob/SlimeEntity;targetStretch:F
      intermediary field_7389 Lnet/minecraft/class_1621;field_7389:F
      official e Lcka;e:F
    • stretch

      public float stretch
      Mappings:
      Namespace Name Mixin selector
      named stretch Lnet/minecraft/entity/mob/SlimeEntity;stretch:F
      intermediary field_7388 Lnet/minecraft/class_1621;field_7388:F
      official bZ Lcka;bZ:F
    • lastStretch

      public float lastStretch
      Mappings:
      Namespace Name Mixin selector
      named lastStretch Lnet/minecraft/entity/mob/SlimeEntity;lastStretch:F
      intermediary field_7387 Lnet/minecraft/class_1621;field_7387:F
      official ca Lcka;ca:F
    • onGroundLastTick

      private boolean onGroundLastTick
      Mappings:
      Namespace Name Mixin selector
      named onGroundLastTick Lnet/minecraft/entity/mob/SlimeEntity;onGroundLastTick:Z
      intermediary field_7391 Lnet/minecraft/class_1621;field_7391:Z
      official cc Lcka;cc:Z
  • Constructor Details

    • SlimeEntity

      public SlimeEntity(EntityType<? extends SlimeEntity> 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> Lbsh;<init>(Lbsn;Ldcg;)V
  • Method Details

    • 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 z Lbte;z()V
    • getSoundCategory

      public SoundCategory getSoundCategory()
      Returns the sound category for sounds from this entity.

      This is used by Entity.playSound(SoundEvent, float, float) and defaults to SoundCategory.NEUTRAL. Hostile entities should override this to return SoundCategory.HOSTILE.

      Overrides:
      getSoundCategory in class Entity
      Returns:
      the sound category for sounds from this entity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named getSoundCategory Lnet/minecraft/entity/Entity;getSoundCategory()Lnet/minecraft/sound/SoundCategory;
      intermediary method_5634 Lnet/minecraft/class_1297;method_5634()Lnet/minecraft/class_3419;
      official dg Lbsh;dg()Lavi;
    • initDataTracker

      protected void initDataTracker(DataTracker.Builder builder)
      Initializes data tracker.
      Overrides:
      initDataTracker in class MobEntity
      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 Lbsh;a(Lajt$a;)V
    • setSize

      public void setSize(int size, boolean heal)
      Mappings:
      Namespace Name Mixin selector
      named setSize Lnet/minecraft/entity/mob/SlimeEntity;setSize(IZ)V
      intermediary method_7161 Lnet/minecraft/class_1621;method_7161(IZ)V
      official a Lcka;a(IZ)V
    • getSize

      public int getSize()
      Mappings:
      Namespace Name Mixin selector
      named getSize Lnet/minecraft/entity/mob/SlimeEntity;getSize()I
      intermediary method_7152 Lnet/minecraft/class_1621;method_7152()I
      official go Lcka;go()I
    • 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 MobEntity
      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 Lbsh;b(Ltx;)V
    • 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 MobEntity
      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 Lbsh;a(Ltx;)V
    • isSmall

      public boolean isSmall()
      Mappings:
      Namespace Name Mixin selector
      named isSmall Lnet/minecraft/entity/mob/SlimeEntity;isSmall()Z
      intermediary method_7157 Lnet/minecraft/class_1621;method_7157()Z
      official gp Lcka;gp()Z
    • getParticles

      protected ParticleEffect getParticles()
      Mappings:
      Namespace Name Mixin selector
      named getParticles Lnet/minecraft/entity/mob/SlimeEntity;getParticles()Lnet/minecraft/particle/ParticleEffect;
      intermediary method_7162 Lnet/minecraft/class_1621;method_7162()Lnet/minecraft/class_2394;
      official t Lcka;t()Llh;
    • isDisallowedInPeaceful

      protected boolean isDisallowedInPeaceful()
      Overrides:
      isDisallowedInPeaceful in class MobEntity
      Mappings:
      Namespace Name Mixin selector
      named isDisallowedInPeaceful Lnet/minecraft/entity/mob/MobEntity;isDisallowedInPeaceful()Z
      intermediary method_23734 Lnet/minecraft/class_1308;method_23734()Z
      official X Lbte;X()Z
    • 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 l Lbsh;l()V
    • updateStretch

      protected void updateStretch()
      Mappings:
      Namespace Name Mixin selector
      named updateStretch Lnet/minecraft/entity/mob/SlimeEntity;updateStretch()V
      intermediary method_7156 Lnet/minecraft/class_1621;method_7156()V
      official gj Lcka;gj()V
    • getTicksUntilNextJump

      protected int getTicksUntilNextJump()
      Mappings:
      Namespace Name Mixin selector
      named getTicksUntilNextJump Lnet/minecraft/entity/mob/SlimeEntity;getTicksUntilNextJump()I
      intermediary method_7154 Lnet/minecraft/class_1621;method_7154()I
      official x Lcka;x()I
    • calculateDimensions

      public void calculateDimensions()
      Calculates and sets the dimension (bounding box) of the entity and refreshes its position.
      Overrides:
      calculateDimensions in class Entity
      Mappings:
      Namespace Name Mixin selector
      named calculateDimensions Lnet/minecraft/entity/Entity;calculateDimensions()V
      intermediary method_18382 Lnet/minecraft/class_1297;method_18382()V
      official i_ Lbsh;i_()V
    • onTrackedDataSet

      public void onTrackedDataSet(TrackedData<?> data)
      Specified by:
      onTrackedDataSet in interface DataTracked
      Overrides:
      onTrackedDataSet in class LivingEntity
      Mappings:
      Namespace Name Mixin selector
      named onTrackedDataSet Lnet/minecraft/entity/data/DataTracked;onTrackedDataSet(Lnet/minecraft/entity/data/TrackedData;)V
      intermediary method_5674 Lnet/minecraft/class_9221;method_5674(Lnet/minecraft/class_2940;)V
      official a Lajs;a(Lajp;)V
    • getType

      public EntityType<? extends SlimeEntity> getType()
      Overrides:
      getType in class Entity
      Mappings:
      Namespace Name Mixin selector
      named getType Lnet/minecraft/entity/Entity;getType()Lnet/minecraft/entity/EntityType;
      intermediary method_5864 Lnet/minecraft/class_1297;method_5864()Lnet/minecraft/class_1299;
      official am Lbsh;am()Lbsn;
    • remove

      public void remove(Entity.RemovalReason reason)
      Removes the entity.
      Overrides:
      remove in class LivingEntity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named remove Lnet/minecraft/entity/Entity;remove(Lnet/minecraft/entity/Entity$RemovalReason;)V
      intermediary method_5650 Lnet/minecraft/class_1297;method_5650(Lnet/minecraft/class_1297$class_5529;)V
      official a Lbsh;a(Lbsh$d;)V
    • pushAwayFrom

      public void pushAwayFrom(Entity entity)
      Overrides:
      pushAwayFrom in class LivingEntity
      Mappings:
      Namespace Name Mixin selector
      named pushAwayFrom Lnet/minecraft/entity/Entity;pushAwayFrom(Lnet/minecraft/entity/Entity;)V
      intermediary method_5697 Lnet/minecraft/class_1297;method_5697(Lnet/minecraft/class_1297;)V
      official h Lbsh;h(Lbsh;)V
    • onPlayerCollision

      public void onPlayerCollision(PlayerEntity player)
      Called when a player collides with the entity. Does nothing by default.

      This should be overridden if the collision logic is specific to players, such as picking up item entities, experience orbs, or arrows.

      Overrides:
      onPlayerCollision in class Entity
      Mappings:
      Namespace Name Mixin selector
      named onPlayerCollision Lnet/minecraft/entity/Entity;onPlayerCollision(Lnet/minecraft/entity/player/PlayerEntity;)V
      intermediary method_5694 Lnet/minecraft/class_1297;method_5694(Lnet/minecraft/class_1657;)V
      official b_ Lbsh;b_(Lcml;)V
    • damage

      protected void damage(LivingEntity target)
      Mappings:
      Namespace Name Mixin selector
      named damage Lnet/minecraft/entity/mob/SlimeEntity;damage(Lnet/minecraft/entity/LivingEntity;)V
      intermediary method_7155 Lnet/minecraft/class_1621;method_7155(Lnet/minecraft/class_1309;)V
      official j Lcka;j(Lbtc;)V
    • getPassengerAttachmentPos

      protected Vec3d getPassengerAttachmentPos(Entity passenger, EntityDimensions dimensions, float scaleFactor)
      Overrides:
      getPassengerAttachmentPos in class Entity
      Mappings:
      Namespace Name Mixin selector
      named getPassengerAttachmentPos Lnet/minecraft/entity/Entity;getPassengerAttachmentPos(Lnet/minecraft/entity/Entity;Lnet/minecraft/entity/EntityDimensions;F)Lnet/minecraft/util/math/Vec3d;
      intermediary method_52533 Lnet/minecraft/class_1297;method_52533(Lnet/minecraft/class_1297;Lnet/minecraft/class_4048;F)Lnet/minecraft/class_243;
      official a Lbsh;a(Lbsh;Lbsk;F)Lewh;
    • canAttack

      protected boolean canAttack()
      Mappings:
      Namespace Name Mixin selector
      named canAttack Lnet/minecraft/entity/mob/SlimeEntity;canAttack()Z
      intermediary method_7163 Lnet/minecraft/class_1621;method_7163()Z
      official gk Lcka;gk()Z
    • getDamageAmount

      protected float getDamageAmount()
      Mappings:
      Namespace Name Mixin selector
      named getDamageAmount Lnet/minecraft/entity/mob/SlimeEntity;getDamageAmount()F
      intermediary method_7158 Lnet/minecraft/class_1621;method_7158()F
      official gl Lcka;gl()F
    • 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 d Lbtc;d(Lbra;)Lavg;
    • 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 n_ Lbtc;n_()Lavg;
    • getSquishSound

      protected SoundEvent getSquishSound()
      Mappings:
      Namespace Name Mixin selector
      named getSquishSound Lnet/minecraft/entity/mob/SlimeEntity;getSquishSound()Lnet/minecraft/sound/SoundEvent;
      intermediary method_7160 Lnet/minecraft/class_1621;method_7160()Lnet/minecraft/class_3414;
      official gm Lcka;gm()Lavg;
    • canSpawn

      public static boolean canSpawn(EntityType<SlimeEntity> type, WorldAccess world, SpawnReason spawnReason, BlockPos pos, Random random)
      Mappings:
      Namespace Name Mixin selector
      named canSpawn Lnet/minecraft/entity/mob/SlimeEntity;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_20685 Lnet/minecraft/class_1621;method_20685(Lnet/minecraft/class_1299;Lnet/minecraft/class_1936;Lnet/minecraft/class_3730;Lnet/minecraft/class_2338;Lnet/minecraft/class_5819;)Z
      official c Lcka;c(Lbsn;Ldch;Lbtg;Lja;Layo;)Z
    • getSoundVolume

      protected float getSoundVolume()
      Overrides:
      getSoundVolume in class LivingEntity
      Mappings:
      Namespace Name Mixin selector
      named getSoundVolume Lnet/minecraft/entity/LivingEntity;getSoundVolume()F
      intermediary method_6107 Lnet/minecraft/class_1309;method_6107()F
      official fc Lbtc;fc()F
    • getMaxLookPitchChange

      public int getMaxLookPitchChange()
      Returns the maximum degrees which the pitch can change when looking.

      This is used by the look control.

      It can return from 1 for entities that can hardly raise their head, like axolotls or dolphins, or 180 for entities that can freely raise and lower their head, like guardians. The default return value is 40.

      Overrides:
      getMaxLookPitchChange in class MobEntity
      Returns:
      the maximum degrees which the pitch can change when looking
      Mappings:
      Namespace Name Mixin selector
      named getMaxLookPitchChange Lnet/minecraft/entity/mob/MobEntity;getMaxLookPitchChange()I
      intermediary method_5978 Lnet/minecraft/class_1308;method_5978()I
      official aa Lbte;aa()I
    • makesJumpSound

      protected boolean makesJumpSound()
      Mappings:
      Namespace Name Mixin selector
      named makesJumpSound Lnet/minecraft/entity/mob/SlimeEntity;makesJumpSound()Z
      intermediary method_7159 Lnet/minecraft/class_1621;method_7159()Z
      official gq Lcka;gq()Z
    • jump

      protected void jump()
      Overrides:
      jump in class LivingEntity
      Mappings:
      Namespace Name Mixin selector
      named jump Lnet/minecraft/entity/LivingEntity;jump()V
      intermediary method_6043 Lnet/minecraft/class_1309;method_6043()V
      official fh Lbtc;fh()V
    • initialize

      @Nullable public @Nullable EntityData initialize(ServerWorldAccess world, LocalDifficulty difficulty, SpawnReason spawnReason, @Nullable @Nullable EntityData entityData)
      Overrides:
      initialize in class MobEntity
      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 Lbte;a(Ldcv;Lbqf;Lbtg;Lbtv;)Lbtv;
    • getJumpSoundPitch

      float getJumpSoundPitch()
      Mappings:
      Namespace Name Mixin selector
      named getJumpSoundPitch Lnet/minecraft/entity/mob/SlimeEntity;getJumpSoundPitch()F
      intermediary method_24353 Lnet/minecraft/class_1621;method_24353()F
      official s Lcka;s()F
    • getJumpSound

      protected SoundEvent getJumpSound()
      Mappings:
      Namespace Name Mixin selector
      named getJumpSound Lnet/minecraft/entity/mob/SlimeEntity;getJumpSound()Lnet/minecraft/sound/SoundEvent;
      intermediary method_7153 Lnet/minecraft/class_1621;method_7153()Lnet/minecraft/class_3414;
      official gn Lcka;gn()Lavg;
    • 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 Lbtc;e(Lbto;)Lbsk;