Class HorseEntity

All Implemented Interfaces:
Attackable, DataTracked, EquipmentHolder, JumpingMount, Mount, RideableInventory, Saddleable, Tameable, Targeter, VariantHolder<HorseColor>, InventoryChangedListener, ScoreHolder, CommandOutput, Nameable, EntityLike

public class HorseEntity extends AbstractHorseEntity implements VariantHolder<HorseColor>
Mappings:
Namespace Name
named net/minecraft/entity/passive/HorseEntity
intermediary net/minecraft/class_1498
official chm
  • Field Details

    • VARIANT

      private static final TrackedData<Integer> VARIANT
      Mappings:
      Namespace Name Mixin selector
      named VARIANT Lnet/minecraft/entity/passive/HorseEntity;VARIANT:Lnet/minecraft/entity/data/TrackedData;
      intermediary field_6990 Lnet/minecraft/class_1498;field_6990:Lnet/minecraft/class_2940;
      official bY Lchm;bY:Lakk;
    • BABY_BASE_DIMENSIONS

      private static final EntityDimensions BABY_BASE_DIMENSIONS
      Mappings:
      Namespace Name Mixin selector
      named BABY_BASE_DIMENSIONS Lnet/minecraft/entity/passive/HorseEntity;BABY_BASE_DIMENSIONS:Lnet/minecraft/entity/EntityDimensions;
      intermediary field_47807 Lnet/minecraft/class_1498;field_47807:Lnet/minecraft/class_4048;
      official bZ Lchm;bZ:Lbsy;
  • Constructor Details

    • HorseEntity

      public HorseEntity(EntityType<? extends HorseEntity> 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> Lbsv;<init>(Lbtb;Ldbz;)V
  • Method Details

    • initAttributes

      protected void initAttributes(Random random)
      Overrides:
      initAttributes in class AbstractHorseEntity
      Mappings:
      Namespace Name Mixin selector
      named initAttributes Lnet/minecraft/entity/passive/AbstractHorseEntity;initAttributes(Lnet/minecraft/util/math/random/Random;)V
      intermediary method_6001 Lnet/minecraft/class_1496;method_6001(Lnet/minecraft/class_5819;)V
      official a Lchk;a(Lazh;)V
    • initDataTracker

      protected void initDataTracker(DataTracker.Builder builder)
      Initializes data tracker.
      Overrides:
      initDataTracker in class AbstractHorseEntity
      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 Lbsv;a(Lako$a;)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 AbstractHorseEntity
      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 Lbsv;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 AbstractHorseEntity
      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 Lbsv;a(Lus;)V
    • setHorseVariant

      private void setHorseVariant(int variant)
      Mappings:
      Namespace Name Mixin selector
      named setHorseVariant Lnet/minecraft/entity/passive/HorseEntity;setHorseVariant(I)V
      intermediary method_6783 Lnet/minecraft/class_1498;method_6783(I)V
      official x Lchm;x(I)V
    • getHorseVariant

      private int getHorseVariant()
      Mappings:
      Namespace Name Mixin selector
      named getHorseVariant Lnet/minecraft/entity/passive/HorseEntity;getHorseVariant()I
      intermediary method_6788 Lnet/minecraft/class_1498;method_6788()I
      official gq Lchm;gq()I
    • setHorseVariant

      private void setHorseVariant(HorseColor color, HorseMarking marking)
      Mappings:
      Namespace Name Mixin selector
      named setHorseVariant Lnet/minecraft/entity/passive/HorseEntity;setHorseVariant(Lnet/minecraft/entity/passive/HorseColor;Lnet/minecraft/entity/passive/HorseMarking;)V
      intermediary method_27076 Lnet/minecraft/class_1498;method_27076(Lnet/minecraft/class_5149;Lnet/minecraft/class_5148;)V
      official a Lchm;a(Lcht;Lcho;)V
    • getVariant

      public HorseColor getVariant()
      Specified by:
      getVariant in interface VariantHolder<HorseColor>
      Mappings:
      Namespace Name Mixin selector
      named getVariant Lnet/minecraft/entity/passive/HorseEntity;getVariant()Lnet/minecraft/entity/passive/HorseColor;
      intermediary method_27077 Lnet/minecraft/class_1498;method_27077()Lnet/minecraft/class_5149;
      official s Lchm;s()Lcht;
    • setVariant

      public void setVariant(HorseColor horseColor)
      Specified by:
      setVariant in interface VariantHolder<HorseColor>
      Mappings:
      Namespace Name Mixin selector
      named setVariant Lnet/minecraft/entity/passive/HorseEntity;setVariant(Lnet/minecraft/entity/passive/HorseColor;)V
      intermediary method_47873 Lnet/minecraft/class_1498;method_47873(Lnet/minecraft/class_5149;)V
      official a Lchm;a(Lcht;)V
    • getMarking

      public HorseMarking getMarking()
      Mappings:
      Namespace Name Mixin selector
      named getMarking Lnet/minecraft/entity/passive/HorseEntity;getMarking()Lnet/minecraft/entity/passive/HorseMarking;
      intermediary method_27078 Lnet/minecraft/class_1498;method_27078()Lnet/minecraft/class_5148;
      official u Lchm;u()Lcho;
    • onInventoryChanged

      public void onInventoryChanged(Inventory sender)
      Specified by:
      onInventoryChanged in interface InventoryChangedListener
      Overrides:
      onInventoryChanged in class AbstractHorseEntity
      Mappings:
      Namespace Name Mixin selector
      named onInventoryChanged Lnet/minecraft/inventory/InventoryChangedListener;onInventoryChanged(Lnet/minecraft/inventory/Inventory;)V
      intermediary method_5453 Lnet/minecraft/class_1265;method_5453(Lnet/minecraft/class_1263;)V
      official a Lbqq;a(Lbqo;)V
    • playWalkSound

      protected void playWalkSound(BlockSoundGroup group)
      Overrides:
      playWalkSound in class AbstractHorseEntity
      Mappings:
      Namespace Name Mixin selector
      named playWalkSound Lnet/minecraft/entity/passive/AbstractHorseEntity;playWalkSound(Lnet/minecraft/sound/BlockSoundGroup;)V
      intermediary method_6761 Lnet/minecraft/class_1496;method_6761(Lnet/minecraft/class_2498;)V
      official a Lchk;a(Ldmn;)V
    • 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 v Lbts;v()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_ Lbtq;o_()Lavz;
    • getEatSound

      @Nullable protected @Nullable SoundEvent getEatSound()
      Overrides:
      getEatSound in class AbstractHorseEntity
      Mappings:
      Namespace Name Mixin selector
      named getEatSound Lnet/minecraft/entity/passive/AbstractHorseEntity;getEatSound()Lnet/minecraft/sound/SoundEvent;
      intermediary method_28368 Lnet/minecraft/class_1496;method_28368()Lnet/minecraft/class_3414;
      official gx Lchk;gx()Lavz;
    • 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 Lbtq;d(Lbro;)Lavz;
    • getAngrySound

      protected SoundEvent getAngrySound()
      Overrides:
      getAngrySound in class AbstractHorseEntity
      Mappings:
      Namespace Name Mixin selector
      named getAngrySound Lnet/minecraft/entity/passive/AbstractHorseEntity;getAngrySound()Lnet/minecraft/sound/SoundEvent;
      intermediary method_6747 Lnet/minecraft/class_1496;method_6747()Lnet/minecraft/class_3414;
      official gO Lchk;gO()Lavz;
    • interactMob

      public ActionResult interactMob(PlayerEntity player, Hand hand)
      Overrides:
      interactMob in class AbstractHorseEntity
      Mappings:
      Namespace Name Mixin selector
      named interactMob Lnet/minecraft/entity/mob/MobEntity;interactMob(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;)Lnet/minecraft/util/ActionResult;
      intermediary method_5992 Lnet/minecraft/class_1308;method_5992(Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;)Lnet/minecraft/class_1269;
      official b Lbts;b(Lcmy;Lbqu;)Lbqv;
    • canBreedWith

      public boolean canBreedWith(AnimalEntity other)
      Overrides:
      canBreedWith in class AbstractHorseEntity
      Mappings:
      Namespace Name Mixin selector
      named canBreedWith Lnet/minecraft/entity/passive/AnimalEntity;canBreedWith(Lnet/minecraft/entity/passive/AnimalEntity;)Z
      intermediary method_6474 Lnet/minecraft/class_1429;method_6474(Lnet/minecraft/class_1429;)Z
      official a Lcfg;a(Lcfg;)Z
    • createChild

      @Nullable public @Nullable PassiveEntity createChild(ServerWorld world, PassiveEntity entity)
      Overrides:
      createChild in class AbstractHorseEntity
      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 Lbsp;a(Larf;Lbsp;)Lbsp;
    • hasArmorSlot

      public boolean hasArmorSlot()
      Overrides:
      hasArmorSlot in class MobEntity
      Mappings:
      Namespace Name Mixin selector
      named hasArmorSlot Lnet/minecraft/entity/mob/MobEntity;hasArmorSlot()Z
      intermediary method_6735 Lnet/minecraft/class_1308;method_6735()Z
      official fS Lbts;fS()Z
    • isHorseArmor

      public boolean isHorseArmor(ItemStack stack)
      Overrides:
      isHorseArmor in class MobEntity
      Mappings:
      Namespace Name Mixin selector
      named isHorseArmor Lnet/minecraft/entity/mob/MobEntity;isHorseArmor(Lnet/minecraft/item/ItemStack;)Z
      intermediary method_6773 Lnet/minecraft/class_1308;method_6773(Lnet/minecraft/class_1799;)Z
      official l Lbts;l(Lcuq;)Z
    • initialize

      @Nullable public @Nullable EntityData initialize(ServerWorldAccess world, LocalDifficulty difficulty, SpawnReason spawnReason, @Nullable @Nullable EntityData entityData)
      Overrides:
      initialize in class AbstractHorseEntity
      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 Lbts;a(Ldco;Lbqt;Lbtu;Lbuj;)Lbuj;
    • 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 Lbtq;e(Lbuc;)Lbsy;