Class InteractionEntity

java.lang.Object
net.minecraft.entity.Entity
net.minecraft.entity.decoration.InteractionEntity
All Implemented Interfaces:
Attackable, Targeter, CommandOutput, Nameable, EntityLike

public class InteractionEntity extends Entity implements Attackable, Targeter
Mappings:
Namespace Name
official bfs
intermediary net/minecraft/class_8150
named net/minecraft/entity/decoration/InteractionEntity
  • Field Details

    • field_42624

      private static final Logger field_42624
      Mappings:
      Namespace Name Mixin selector
      official b Lbfs;b:Lorg/slf4j/Logger;
      intermediary field_42624 Lnet/minecraft/class_8150;field_42624:Lorg/slf4j/Logger;
      named field_42624 Lnet/minecraft/entity/decoration/InteractionEntity;field_42624:Lorg/slf4j/Logger;
    • WIDTH

      private static final TrackedData<Float> WIDTH
      Mappings:
      Namespace Name Mixin selector
      official c Lbfs;c:Lacl;
      intermediary field_42625 Lnet/minecraft/class_8150;field_42625:Lnet/minecraft/class_2940;
      named WIDTH Lnet/minecraft/entity/decoration/InteractionEntity;WIDTH:Lnet/minecraft/entity/data/TrackedData;
    • HEIGHT

      private static final TrackedData<Float> HEIGHT
      Mappings:
      Namespace Name Mixin selector
      official d Lbfs;d:Lacl;
      intermediary field_42626 Lnet/minecraft/class_8150;field_42626:Lnet/minecraft/class_2940;
      named HEIGHT Lnet/minecraft/entity/decoration/InteractionEntity;HEIGHT:Lnet/minecraft/entity/data/TrackedData;
    • RESPONSE

      private static final TrackedData<Boolean> RESPONSE
      Mappings:
      Namespace Name Mixin selector
      official e Lbfs;e:Lacl;
      intermediary field_42627 Lnet/minecraft/class_8150;field_42627:Lnet/minecraft/class_2940;
      named RESPONSE Lnet/minecraft/entity/decoration/InteractionEntity;RESPONSE:Lnet/minecraft/entity/data/TrackedData;
    • WIDTH_KEY

      private static final String WIDTH_KEY
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official f Lbfs;f:Ljava/lang/String;
      intermediary field_42628 Lnet/minecraft/class_8150;field_42628:Ljava/lang/String;
      named WIDTH_KEY Lnet/minecraft/entity/decoration/InteractionEntity;WIDTH_KEY:Ljava/lang/String;
    • HEIGHT_KEY

      private static final String HEIGHT_KEY
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official g Lbfs;g:Ljava/lang/String;
      intermediary field_42629 Lnet/minecraft/class_8150;field_42629:Ljava/lang/String;
      named HEIGHT_KEY Lnet/minecraft/entity/decoration/InteractionEntity;HEIGHT_KEY:Ljava/lang/String;
    • ATTACK_KEY

      private static final String ATTACK_KEY
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official h Lbfs;h:Ljava/lang/String;
      intermediary field_42630 Lnet/minecraft/class_8150;field_42630:Ljava/lang/String;
      named ATTACK_KEY Lnet/minecraft/entity/decoration/InteractionEntity;ATTACK_KEY:Ljava/lang/String;
    • INTERACTION_KEY

      private static final String INTERACTION_KEY
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official i Lbfs;i:Ljava/lang/String;
      intermediary field_42631 Lnet/minecraft/class_8150;field_42631:Ljava/lang/String;
      named INTERACTION_KEY Lnet/minecraft/entity/decoration/InteractionEntity;INTERACTION_KEY:Ljava/lang/String;
    • RESPONSE_KEY

      private static final String RESPONSE_KEY
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official j Lbfs;j:Ljava/lang/String;
      intermediary field_42632 Lnet/minecraft/class_8150;field_42632:Ljava/lang/String;
      named RESPONSE_KEY Lnet/minecraft/entity/decoration/InteractionEntity;RESPONSE_KEY:Ljava/lang/String;
    • attack

      Mappings:
      Namespace Name Mixin selector
      official k Lbfs;k:Lbfs$a;
      intermediary field_42633 Lnet/minecraft/class_8150;field_42633:Lnet/minecraft/class_8150$class_8151;
      named attack Lnet/minecraft/entity/decoration/InteractionEntity;attack:Lnet/minecraft/entity/decoration/InteractionEntity$Interaction;
    • interaction

      Mappings:
      Namespace Name Mixin selector
      official l Lbfs;l:Lbfs$a;
      intermediary field_42634 Lnet/minecraft/class_8150;field_42634:Lnet/minecraft/class_8150$class_8151;
      named interaction Lnet/minecraft/entity/decoration/InteractionEntity;interaction:Lnet/minecraft/entity/decoration/InteractionEntity$Interaction;
  • Constructor Details

    • InteractionEntity

      public InteractionEntity(EntityType<?> type, World world)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lbfh;<init>(Lbfl;Lcmi;)V
      intermediary <init> Lnet/minecraft/class_1297;<init>(Lnet/minecraft/class_1299;Lnet/minecraft/class_1937;)V
      named <init> Lnet/minecraft/entity/Entity;<init>(Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/World;)V
  • Method Details

    • initDataTracker

      protected void initDataTracker()
      Initializes data tracker.
      Specified by:
      initDataTracker in class Entity
      Mappings:
      Namespace Name Mixin selector
      official a_ Lbfh;a_()V
      intermediary method_5693 Lnet/minecraft/class_1297;method_5693()V
      named initDataTracker Lnet/minecraft/entity/Entity;initDataTracker()V
    • readCustomDataFromNbt

      protected void readCustomDataFromNbt(NbtCompound nbt)
      Reads custom data from nbt. Subclasses has 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.

      Specified by:
      readCustomDataFromNbt in class Entity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Lbfh;a(Lre;)V
      intermediary method_5749 Lnet/minecraft/class_1297;method_5749(Lnet/minecraft/class_2487;)V
      named readCustomDataFromNbt Lnet/minecraft/entity/Entity;readCustomDataFromNbt(Lnet/minecraft/nbt/NbtCompound;)V
    • writeCustomDataToNbt

      protected void writeCustomDataToNbt(NbtCompound nbt)
      Writes custom data to nbt. Subclasses has 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.

      Specified by:
      writeCustomDataToNbt in class Entity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official b Lbfh;b(Lre;)V
      intermediary method_5652 Lnet/minecraft/class_1297;method_5652(Lnet/minecraft/class_2487;)V
      named writeCustomDataToNbt Lnet/minecraft/entity/Entity;writeCustomDataToNbt(Lnet/minecraft/nbt/NbtCompound;)V
    • onTrackedDataSet

      public void onTrackedDataSet(TrackedData<?> data)
      Called on the client when the tracked data is set.

      This can be overridden to refresh other fields when the tracked data is set or changed.

      Overrides:
      onTrackedDataSet in class Entity
      Mappings:
      Namespace Name Mixin selector
      official a Lbfh;a(Lacl;)V
      intermediary method_5674 Lnet/minecraft/class_1297;method_5674(Lnet/minecraft/class_2940;)V
      named onTrackedDataSet Lnet/minecraft/entity/Entity;onTrackedDataSet(Lnet/minecraft/entity/data/TrackedData;)V
    • canBeHitByProjectile

      public boolean canBeHitByProjectile()
      Overrides:
      canBeHitByProjectile in class Entity
      Mappings:
      Namespace Name Mixin selector
      official bl Lbfh;bl()Z
      intermediary method_49108 Lnet/minecraft/class_1297;method_49108()Z
      named canBeHitByProjectile Lnet/minecraft/entity/Entity;canBeHitByProjectile()Z
    • canHit

      public boolean canHit()
      Returns whether the entity can be hit with a projectile or be targeted by the player crosshair.
      Overrides:
      canHit in class Entity
      Returns:
      whether the entity can be hit with a projectile or be targeted by the player crosshair
      Mappings:
      Namespace Name Mixin selector
      official bm Lbfh;bm()Z
      intermediary method_5863 Lnet/minecraft/class_1297;method_5863()Z
      named canHit Lnet/minecraft/entity/Entity;canHit()Z
    • getPistonBehavior

      public PistonBehavior getPistonBehavior()
      Returns the behavior of the piston for this entity.

      This is PistonBehavior.NORMAL by default. AreaEffectCloudEntity, MarkerEntity, and marker ArmorStandEntity return PistonBehavior.IGNORE, causing the piston to not affect the entity's position. Other piston behaviors are inapplicable to entities, and treated like PistonBehavior.NORMAL.

      Overrides:
      getPistonBehavior in class Entity
      Returns:
      the behavior of the piston for this entity
      Mappings:
      Namespace Name Mixin selector
      official C_ Lbfh;C_()Ldwp;
      intermediary method_5657 Lnet/minecraft/class_1297;method_5657()Lnet/minecraft/class_3619;
      named getPistonBehavior Lnet/minecraft/entity/Entity;getPistonBehavior()Lnet/minecraft/block/piston/PistonBehavior;
    • handleAttack

      public boolean handleAttack(Entity attacker)
      Handles a player attacking the entity. This is called before Entity.damage(net.minecraft.entity.damage.DamageSource, float) and can be used to restrict players from attacking the entity by returning true.
      Overrides:
      handleAttack in class Entity
      Returns:
      whether to stop handling the attack
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official r Lbfh;r(Lbfh;)Z
      intermediary method_5698 Lnet/minecraft/class_1297;method_5698(Lnet/minecraft/class_1297;)Z
      named handleAttack Lnet/minecraft/entity/Entity;handleAttack(Lnet/minecraft/entity/Entity;)Z
    • interact

      public ActionResult interact(PlayerEntity player, Hand hand)
      Called when a player interacts with this entity.
      Overrides:
      interact in class Entity
      Parameters:
      player - the player
      hand - the hand the player used to interact with this entity
      Mappings:
      Namespace Name Mixin selector
      official a Lbfh;a(Lbym;Lbdx;)Lbdy;
      intermediary method_5688 Lnet/minecraft/class_1297;method_5688(Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;)Lnet/minecraft/class_1269;
      named interact Lnet/minecraft/entity/Entity;interact(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;)Lnet/minecraft/util/ActionResult;
    • tick

      public void tick()
      Ticks this entity.
      Overrides:
      tick in class Entity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official l Lbfh;l()V
      intermediary method_5773 Lnet/minecraft/class_1297;method_5773()V
      named tick Lnet/minecraft/entity/Entity;tick()V
    • getLastAttacker

      @Nullable public @Nullable LivingEntity getLastAttacker()
      Specified by:
      getLastAttacker in interface Attackable
      Mappings:
      Namespace Name Mixin selector
      official L_ Lbff;L_()Lbfx;
      intermediary method_49107 Lnet/minecraft/class_8149;method_49107()Lnet/minecraft/class_1309;
      named getLastAttacker Lnet/minecraft/entity/Attackable;getLastAttacker()Lnet/minecraft/entity/LivingEntity;
    • getTarget

      @Nullable public @Nullable LivingEntity getTarget()
      Specified by:
      getTarget in interface Targeter
      Mappings:
      Namespace Name Mixin selector
      official P_ Lbgu;P_()Lbfx;
      intermediary method_5968 Lnet/minecraft/class_8152;method_5968()Lnet/minecraft/class_1309;
      named getTarget Lnet/minecraft/entity/Targeter;getTarget()Lnet/minecraft/entity/LivingEntity;
    • setInteractionWidth

      private void setInteractionWidth(float width)
      Mappings:
      Namespace Name Mixin selector
      official a Lbfs;a(F)V
      intermediary method_49109 Lnet/minecraft/class_8150;method_49109(F)V
      named setInteractionWidth Lnet/minecraft/entity/decoration/InteractionEntity;setInteractionWidth(F)V
    • getInteractionWidth

      private float getInteractionWidth()
      Mappings:
      Namespace Name Mixin selector
      official j Lbfs;j()F
      intermediary method_49116 Lnet/minecraft/class_8150;method_49116()F
      named getInteractionWidth Lnet/minecraft/entity/decoration/InteractionEntity;getInteractionWidth()F
    • setInteractionHeight

      private void setInteractionHeight(float height)
      Mappings:
      Namespace Name Mixin selector
      official b Lbfs;b(F)V
      intermediary method_49113 Lnet/minecraft/class_8150;method_49113(F)V
      named setInteractionHeight Lnet/minecraft/entity/decoration/InteractionEntity;setInteractionHeight(F)V
    • getInteractionHeight

      private float getInteractionHeight()
      Mappings:
      Namespace Name Mixin selector
      official k Lbfs;k()F
      intermediary method_49117 Lnet/minecraft/class_8150;method_49117()F
      named getInteractionHeight Lnet/minecraft/entity/decoration/InteractionEntity;getInteractionHeight()F
    • setResponse

      private void setResponse(boolean response)
      Mappings:
      Namespace Name Mixin selector
      official a Lbfs;a(Z)V
      intermediary method_49112 Lnet/minecraft/class_8150;method_49112(Z)V
      named setResponse Lnet/minecraft/entity/decoration/InteractionEntity;setResponse(Z)V
    • shouldRespond

      private boolean shouldRespond()
      Mappings:
      Namespace Name Mixin selector
      official o Lbfs;o()Z
      intermediary method_49118 Lnet/minecraft/class_8150;method_49118()Z
      named shouldRespond Lnet/minecraft/entity/decoration/InteractionEntity;shouldRespond()Z
    • getDimensions

      private EntityDimensions getDimensions()
      Mappings:
      Namespace Name Mixin selector
      official p Lbfs;p()Lbfi;
      intermediary method_49119 Lnet/minecraft/class_8150;method_49119()Lnet/minecraft/class_4048;
      named getDimensions Lnet/minecraft/entity/decoration/InteractionEntity;getDimensions()Lnet/minecraft/entity/EntityDimensions;
    • getDimensions

      public EntityDimensions getDimensions(EntityPose pose)
      Returns the dimensions of the entity with the given pose.
      Overrides:
      getDimensions in class Entity
      Returns:
      the dimensions of the entity with the given pose
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Lbfh;a(Lbgj;)Lbfi;
      intermediary method_18377 Lnet/minecraft/class_1297;method_18377(Lnet/minecraft/class_4050;)Lnet/minecraft/class_4048;
      named getDimensions Lnet/minecraft/entity/Entity;getDimensions(Lnet/minecraft/entity/EntityPose;)Lnet/minecraft/entity/EntityDimensions;
    • calculateBoundingBox

      protected Box calculateBoundingBox()
      Overrides:
      calculateBoundingBox in class Entity
      Mappings:
      Namespace Name Mixin selector
      official am Lbfh;am()Lecz;
      intermediary method_33332 Lnet/minecraft/class_1297;method_33332()Lnet/minecraft/class_238;
      named calculateBoundingBox Lnet/minecraft/entity/Entity;calculateBoundingBox()Lnet/minecraft/util/math/Box;