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 cko
  • 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 bZ Lcko;bZ:Lakk;
    • 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 Lcko;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 Lcko;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 Lcko;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 Lcko;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 bX Lcko;bX: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 bY Lcko;bY: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 ca Lcko;ca: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> Lbsw;<init>(Lbtc;Ldca;)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 Lbtt;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 de Lbsw;de()Lawb;
    • 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 Lbsw;a(Lako$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 Lcko;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 gr Lcko;gr()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 Lbsw;b(Lus;)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 Lbsw;a(Lus;)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 gs Lcko;gs()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 u Lcko;u()Llg;
    • 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 Lbtt;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 Lbsw;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 gm Lcko;gm()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 y Lcko;y()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 j_ Lbsw;j_()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 Lakn;a(Lakk;)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 ak Lbsw;ak()Lbtc;
    • 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 Lbsw;a(Lbsw$c;)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 Lbsw;h(Lbsw;)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_ Lbsw;b_(Lcmz;)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 Lcko;j(Lbtr;)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 Lbsw;a(Lbsw;Lbsz;F)Levt;
    • 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 gn Lcko;gn()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 go Lcko;go()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 Lbtr;d(Lbrp;)Lavz;
    • 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_ Lbtr;o_()Lavz;
    • 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 gp Lcko;gp()Lavz;
    • 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 Lcko;c(Lbtc;Ldcb;Lbtv;Liz;Lazh;)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 fe Lbtr;fe()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 Lbtt;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 gt Lcko;gt()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 fj Lbtr;fj()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 Lbtt;a(Ldcp;Lbqu;Lbtv;Lbuk;)Lbuk;
    • 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 Lcko;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 gq Lcko;gq()Lavz;
    • 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 Lbtr;e(Lbud;)Lbsz;