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 beh
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 Lbeh;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 Lbeh;c:Lqp;
      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> Lbdr;<init>(Lbdv;Lcjw;)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 Lbdr;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_ Lbdr;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 Lbdr;a(Lqp;)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 Lbdr;b(Lqp;)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 T Lbdr;T()Luh;
      intermediary method_18002 Lnet/minecraft/class_1297;method_18002()Lnet/minecraft/class_2596;
      named createSpawnPacket Lnet/minecraft/entity/Entity;createSpawnPacket()Lnet/minecraft/network/Packet;
    • 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 n Lbdr;n(Lbdr;)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 z_ Lbdr;z_()Ldtp;
      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;