Class LeashKnotEntity

All Implemented Interfaces:
DataTracked, ScoreHolder, CommandOutput, Nameable, EntityLike

public class LeashKnotEntity extends BlockAttachedEntity
Mappings:
Namespace Name
named net/minecraft/entity/decoration/LeashKnotEntity
intermediary net/minecraft/class_1532
official cjb
  • Field Details

    • field_30455

      public static final double field_30455
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_30455 Lnet/minecraft/entity/decoration/LeashKnotEntity;field_30455:D
      intermediary field_30455 Lnet/minecraft/class_1532;field_30455:D
      official c Lcjb;c:D
  • Constructor Details

    • LeashKnotEntity

      public LeashKnotEntity(EntityType<? extends LeashKnotEntity> 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> Lbsr;<init>(Lbsx;Ldcw;)V
    • LeashKnotEntity

      public LeashKnotEntity(World world, BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/decoration/LeashKnotEntity;<init>(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)V
      intermediary <init> Lnet/minecraft/class_1532;<init>(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)V
      official <init> Lcjb;<init>(Ldcw;Ljd;)V
  • Method Details

    • initDataTracker

      protected void initDataTracker(DataTracker.Builder builder)
      Initializes data tracker.
      Specified by:
      initDataTracker in class Entity
      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 Lbsr;a(Laka$a;)V
    • updateAttachmentPosition

      protected void updateAttachmentPosition()
      Specified by:
      updateAttachmentPosition in class BlockAttachedEntity
      Mappings:
      Namespace Name Mixin selector
      named updateAttachmentPosition Lnet/minecraft/entity/decoration/BlockAttachedEntity;updateAttachmentPosition()V
      intermediary method_6895 Lnet/minecraft/class_9691;method_6895()V
      official p Lcix;p()V
    • shouldRender

      public boolean shouldRender(double distance)
      Overrides:
      shouldRender in class Entity
      Mappings:
      Namespace Name Mixin selector
      named shouldRender Lnet/minecraft/entity/Entity;shouldRender(D)Z
      intermediary method_5640 Lnet/minecraft/class_1297;method_5640(D)Z
      official a Lbsr;a(D)Z
    • onBreak

      public void onBreak(@Nullable @Nullable Entity breaker)
      Specified by:
      onBreak in class BlockAttachedEntity
      Mappings:
      Namespace Name Mixin selector
      named onBreak Lnet/minecraft/entity/decoration/BlockAttachedEntity;onBreak(Lnet/minecraft/entity/Entity;)V
      intermediary method_6889 Lnet/minecraft/class_9691;method_6889(Lnet/minecraft/class_1297;)V
      official b Lcix;b(Lbsr;)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 BlockAttachedEntity
      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 Lbsr;b(Lub;)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 BlockAttachedEntity
      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 Lbsr;a(Lub;)V
    • 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
      named interact Lnet/minecraft/entity/Entity;interact(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;)Lnet/minecraft/util/ActionResult;
      intermediary method_5688 Lnet/minecraft/class_1297;method_5688(Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;)Lnet/minecraft/class_1269;
      official a Lbsr;a(Lcmx;Lbqq;)Lbqr;
    • canStayAttached

      public boolean canStayAttached()
      Specified by:
      canStayAttached in class BlockAttachedEntity
      Mappings:
      Namespace Name Mixin selector
      named canStayAttached Lnet/minecraft/entity/decoration/BlockAttachedEntity;canStayAttached()Z
      intermediary method_6888 Lnet/minecraft/class_9691;method_6888()Z
      official s Lcix;s()Z
    • getOrCreate

      public static LeashKnotEntity getOrCreate(World world, BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      named getOrCreate Lnet/minecraft/entity/decoration/LeashKnotEntity;getOrCreate(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/entity/decoration/LeashKnotEntity;
      intermediary method_6932 Lnet/minecraft/class_1532;method_6932(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)Lnet/minecraft/class_1532;
      official b Lcjb;b(Ldcw;Ljd;)Lcjb;
    • onPlace

      public void onPlace()
      Mappings:
      Namespace Name Mixin selector
      named onPlace Lnet/minecraft/entity/decoration/LeashKnotEntity;onPlace()V
      intermediary method_59944 Lnet/minecraft/class_1532;method_59944()V
      official v Lcjb;v()V
    • createSpawnPacket

      public Packet<ClientPlayPacketListener> createSpawnPacket(EntityTrackerEntry entityTrackerEntry)
      Returns a packet to notify the clients of the entity's spawning.
      Overrides:
      createSpawnPacket in class Entity
      Returns:
      a packet to notify the clients of the entity's spawning
      API Note:
      Subclasses should return new EntitySpawnS2CPacket(this), unless they use a custom spawning packet.
      Mappings:
      Namespace Name Mixin selector
      named createSpawnPacket Lnet/minecraft/entity/Entity;createSpawnPacket(Lnet/minecraft/server/network/EntityTrackerEntry;)Lnet/minecraft/network/packet/Packet;
      intermediary method_18002 Lnet/minecraft/class_1297;method_18002(Lnet/minecraft/class_3231;)Lnet/minecraft/class_2596;
      official a Lbsr;a(Laqt;)Lzg;
    • getLeashPos

      public Vec3d getLeashPos(float delta)
      Returns the position of the leash this entity holds.

      This is different from Entity.getLeashOffset(float); this method is called on the entity that holds the leash.

      Overrides:
      getLeashPos in class Entity
      Returns:
      the position of the leash this entity holds
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named getLeashPos Lnet/minecraft/entity/Entity;getLeashPos(F)Lnet/minecraft/util/math/Vec3d;
      intermediary method_30951 Lnet/minecraft/class_1297;method_30951(F)Lnet/minecraft/class_243;
      official s Lbsr;s(F)Lexc;
    • getPickBlockStack

      public ItemStack getPickBlockStack()
      Returns the stack for creative "pick block" functionality, or null if there is none.

      If the entity has an item representation (such as boats or minecarts), this should be overridden to return a new stack. Note that MobEntity handles the spawn eggs. ItemFrameEntity instead returns the copy of the stack held in the frame.

      Overrides:
      getPickBlockStack in class Entity
      Returns:
      the stack for creative "pick block" functionality, or null if there is none
      Mappings:
      Namespace Name Mixin selector
      named getPickBlockStack Lnet/minecraft/entity/Entity;getPickBlockStack()Lnet/minecraft/item/ItemStack;
      intermediary method_31480 Lnet/minecraft/class_1297;method_31480()Lnet/minecraft/class_1799;
      official dB Lbsr;dB()Lcuq;