Class MarkerEntity

java.lang.Object
net.minecraft.entity.Entity
net.minecraft.entity.MarkerEntity
All Implemented Interfaces:
CommandOutput, Nameable, EntityLike

public class MarkerEntity extends Entity
Mappings:
Namespace Name
official bfu
intermediary net/minecraft/class_6335
named net/minecraft/entity/MarkerEntity
  • Field Details

    • DATA_KEY

      private static final String DATA_KEY
      The name of the compound tag that stores the marker's custom data.
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official b Lbfu;b:Ljava/lang/String;
      intermediary field_33457 Lnet/minecraft/class_6335;field_33457:Ljava/lang/String;
      named DATA_KEY Lnet/minecraft/entity/MarkerEntity;DATA_KEY:Ljava/lang/String;
    • data

      private NbtCompound data
      Mappings:
      Namespace Name Mixin selector
      official c Lbfu;c:Lqr;
      intermediary field_33458 Lnet/minecraft/class_6335;field_33458:Lnet/minecraft/class_2487;
      named data Lnet/minecraft/entity/MarkerEntity;data:Lnet/minecraft/nbt/NbtCompound;
  • Constructor Details

    • MarkerEntity

      public MarkerEntity(EntityType<?> type, World world)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lbfd;<init>(Lbfh;Lcmf;)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

    • tick

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

      protected void initDataTracker()
      Initializes data tracker.
      Specified by:
      initDataTracker in class Entity
      Mappings:
      Namespace Name Mixin selector
      official a_ Lbfd;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 Lbfd;a(Lqr;)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 Lbfd;b(Lqr;)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
    • 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
      Mappings:
      Namespace Name Mixin selector
      official S Lbfd;S()Luo;
      intermediary method_18002 Lnet/minecraft/class_1297;method_18002()Lnet/minecraft/class_2596;
      named createSpawnPacket Lnet/minecraft/entity/Entity;createSpawnPacket()Lnet/minecraft/network/packet/Packet;
    • canAddPassenger

      protected boolean canAddPassenger(Entity passenger)
      Returns whether entity can ride this entity.

      Returning false causes other entities to be unable to ride this entity. For example, BoatEntity uses this to restrict how many passengers can ride the same boat (2 for normal, 1 for chest boat).

      This is the opposite of Entity.canStartRiding(net.minecraft.entity.Entity).

      Overrides:
      canAddPassenger in class Entity
      Returns:
      whether entity can ride this entity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official o Lbfd;o(Lbfd;)Z
      intermediary method_5818 Lnet/minecraft/class_1297;method_5818(Lnet/minecraft/class_1297;)Z
      named canAddPassenger Lnet/minecraft/entity/Entity;canAddPassenger(Lnet/minecraft/entity/Entity;)Z
    • couldAcceptPassenger

      protected boolean couldAcceptPassenger()
      Returns true if this entity supports passengers in general.
      Overrides:
      couldAcceptPassenger in class Entity
      Returns:
      true if this entity supports passengers in general
      Mappings:
      Namespace Name Mixin selector
      official bA Lbfd;bA()Z
      intermediary method_48921 Lnet/minecraft/class_1297;method_48921()Z
      named couldAcceptPassenger Lnet/minecraft/entity/Entity;couldAcceptPassenger()Z
    • addPassenger

      protected void addPassenger(Entity passenger)
      Adds passenger as a passenger. This should not be called normally; call Entity.startRiding(Entity) instead. (Note that the entity to pass and the entity to call are swapped in this case; entity.startRiding(vehicle) is the equivalent of vehicle.addPassenger(entity).)
      Overrides:
      addPassenger in class Entity
      Mappings:
      Namespace Name Mixin selector
      official m Lbfd;m(Lbfd;)V
      intermediary method_5627 Lnet/minecraft/class_1297;method_5627(Lnet/minecraft/class_1297;)V
      named addPassenger Lnet/minecraft/entity/Entity;addPassenger(Lnet/minecraft/entity/Entity;)V
    • 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_ Lbfd;C_()Ldxb;
      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;