Class LeashKnotEntity

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

public class LeashKnotEntity extends AbstractDecorationEntity
Mappings:
Namespace Name
named net/minecraft/entity/decoration/LeashKnotEntity
intermediary net/minecraft/class_1532
official cjd
  • 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 e Lcjd;e: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> Lbsw;<init>(Lbtc;Ldca;)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> Lcjd;<init>(Ldca;Liz;)V
  • Method Details

    • updateAttachmentPosition

      protected void updateAttachmentPosition()
      Overrides:
      updateAttachmentPosition in class AbstractDecorationEntity
      Mappings:
      Namespace Name Mixin selector
      named updateAttachmentPosition Lnet/minecraft/entity/decoration/AbstractDecorationEntity;updateAttachmentPosition()V
      intermediary method_6895 Lnet/minecraft/class_1530;method_6895()V
      official y Lcjb;y()V
    • setFacing

      public void setFacing(Direction facing)
      Overrides:
      setFacing in class AbstractDecorationEntity
      Mappings:
      Namespace Name Mixin selector
      named setFacing Lnet/minecraft/entity/decoration/AbstractDecorationEntity;setFacing(Lnet/minecraft/util/math/Direction;)V
      intermediary method_6892 Lnet/minecraft/class_1530;method_6892(Lnet/minecraft/class_2350;)V
      official a Lcjb;a(Lje;)V
    • getWidthPixels

      public int getWidthPixels()
      Specified by:
      getWidthPixels in class AbstractDecorationEntity
      Mappings:
      Namespace Name Mixin selector
      named getWidthPixels Lnet/minecraft/entity/decoration/AbstractDecorationEntity;getWidthPixels()I
      intermediary method_6897 Lnet/minecraft/class_1530;method_6897()I
      official A Lcjb;A()I
    • getHeightPixels

      public int getHeightPixels()
      Specified by:
      getHeightPixels in class AbstractDecorationEntity
      Mappings:
      Namespace Name Mixin selector
      named getHeightPixels Lnet/minecraft/entity/decoration/AbstractDecorationEntity;getHeightPixels()I
      intermediary method_6891 Lnet/minecraft/class_1530;method_6891()I
      official B Lcjb;B()I
    • 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 Lbsw;a(D)Z
    • onBreak

      public void onBreak(@Nullable @Nullable Entity entity)
      Specified by:
      onBreak in class AbstractDecorationEntity
      Mappings:
      Namespace Name Mixin selector
      named onBreak Lnet/minecraft/entity/decoration/AbstractDecorationEntity;onBreak(Lnet/minecraft/entity/Entity;)V
      intermediary method_6889 Lnet/minecraft/class_1530;method_6889(Lnet/minecraft/class_1297;)V
      official b Lcjb;b(Lbsw;)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 AbstractDecorationEntity
      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 AbstractDecorationEntity
      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
    • 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 Lbsw;a(Lcmz;Lbqv;)Lbqw;
    • canStayAttached

      public boolean canStayAttached()
      Overrides:
      canStayAttached in class AbstractDecorationEntity
      Mappings:
      Namespace Name Mixin selector
      named canStayAttached Lnet/minecraft/entity/decoration/AbstractDecorationEntity;canStayAttached()Z
      intermediary method_6888 Lnet/minecraft/class_1530;method_6888()Z
      official z Lcjb;z()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 Lcjd;b(Ldca;Liz;)Lcjd;
    • onPlace

      public void onPlace()
      Specified by:
      onPlace in class AbstractDecorationEntity
      Mappings:
      Namespace Name Mixin selector
      named onPlace Lnet/minecraft/entity/decoration/AbstractDecorationEntity;onPlace()V
      intermediary method_6894 Lnet/minecraft/class_1530;method_6894()V
      official C Lcjb;C()V
    • createSpawnPacket

      public Packet<ClientPlayPacketListener> createSpawnPacket()
      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/network/packet/Packet;
      intermediary method_18002 Lnet/minecraft/class_1297;method_18002()Lnet/minecraft/class_2596;
      official dl Lbsw;dl()Lzw;
    • 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 q Lbsw;q(F)Levt;
    • 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 dC Lbsw;dC()Lcur;