Class SpawnerMinecartEntity

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

public class SpawnerMinecartEntity extends AbstractMinecartEntity
Mappings:
Namespace Name
named net/minecraft/entity/vehicle/SpawnerMinecartEntity
intermediary net/minecraft/class_1699
official cpc
  • Field Details

    • logic

      private final MobSpawnerLogic logic
      Mappings:
      Namespace Name Mixin selector
      named logic Lnet/minecraft/entity/vehicle/SpawnerMinecartEntity;logic:Lnet/minecraft/block/spawner/MobSpawnerLogic;
      intermediary field_7746 Lnet/minecraft/class_1699;field_7746:Lnet/minecraft/class_1917;
      official c Lcpc;c:Ldbw;
    • ticker

      private final Runnable ticker
      Mappings:
      Namespace Name Mixin selector
      named ticker Lnet/minecraft/entity/vehicle/SpawnerMinecartEntity;ticker:Ljava/lang/Runnable;
      intermediary field_27012 Lnet/minecraft/class_1699;field_27012:Ljava/lang/Runnable;
      official d Lcpc;d:Ljava/lang/Runnable;
  • Constructor Details

    • SpawnerMinecartEntity

      public SpawnerMinecartEntity(EntityType<? extends SpawnerMinecartEntity> 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> Lbsq;<init>(Lbsw;Ldcu;)V
    • SpawnerMinecartEntity

      public SpawnerMinecartEntity(World world, double x, double y, double z)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/vehicle/SpawnerMinecartEntity;<init>(Lnet/minecraft/world/World;DDD)V
      intermediary <init> Lnet/minecraft/class_1699;<init>(Lnet/minecraft/class_1937;DDD)V
      official <init> Lcpc;<init>(Ldcu;DDD)V
  • Method Details

    • asItem

      protected Item asItem()
      Specified by:
      asItem in class VehicleEntity
      Mappings:
      Namespace Name Mixin selector
      named asItem Lnet/minecraft/entity/vehicle/VehicleEntity;asItem()Lnet/minecraft/item/Item;
      intermediary method_7557 Lnet/minecraft/class_8836;method_7557()Lnet/minecraft/class_1792;
      official ag_ Lcpe;ag_()Lcuj;
    • getTicker

      private Runnable getTicker(World world)
      Mappings:
      Namespace Name Mixin selector
      named getTicker Lnet/minecraft/entity/vehicle/SpawnerMinecartEntity;getTicker(Lnet/minecraft/world/World;)Ljava/lang/Runnable;
      intermediary method_31553 Lnet/minecraft/class_1699;method_31553(Lnet/minecraft/class_1937;)Ljava/lang/Runnable;
      official b Lcpc;b(Ldcu;)Ljava/lang/Runnable;
    • getMinecartType

      public AbstractMinecartEntity.Type getMinecartType()
      Specified by:
      getMinecartType in class AbstractMinecartEntity
      Mappings:
      Namespace Name Mixin selector
      named getMinecartType Lnet/minecraft/entity/vehicle/AbstractMinecartEntity;getMinecartType()Lnet/minecraft/entity/vehicle/AbstractMinecartEntity$Type;
      intermediary method_7518 Lnet/minecraft/class_1688;method_7518()Lnet/minecraft/class_1688$class_1689;
      official v Lcor;v()Lcor$a;
    • getDefaultContainedBlock

      public BlockState getDefaultContainedBlock()
      Overrides:
      getDefaultContainedBlock in class AbstractMinecartEntity
      Mappings:
      Namespace Name Mixin selector
      named getDefaultContainedBlock Lnet/minecraft/entity/vehicle/AbstractMinecartEntity;getDefaultContainedBlock()Lnet/minecraft/block/BlockState;
      intermediary method_7517 Lnet/minecraft/class_1688;method_7517()Lnet/minecraft/class_2680;
      official x Lcor;x()Ldta;
    • readCustomDataFromNbt

      protected 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 AbstractMinecartEntity
      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 Lbsq;a(Lua;)V
    • writeCustomDataToNbt

      protected 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 AbstractMinecartEntity
      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 Lbsq;b(Lua;)V
    • handleStatus

      public void handleStatus(byte status)
      Called on the client when the entity receives an entity status from the server. They are often used to spawn particles or play sounds. Subclasses can override this method to handle custom entity status.
      Overrides:
      handleStatus in class Entity
      See Also:
      API Note:
      To send an entity status, use World.sendEntityStatus(net.minecraft.entity.Entity, byte).
      Mappings:
      Namespace Name Mixin selector
      named handleStatus Lnet/minecraft/entity/Entity;handleStatus(B)V
      intermediary method_5711 Lnet/minecraft/class_1297;method_5711(B)V
      official b Lbsq;b(B)V
    • tick

      public void tick()
      Ticks this entity.
      Overrides:
      tick in class AbstractMinecartEntity
      See Also:
      API Note:
      This can be overridden to add additional logics. super.tick(); should be called in those cases.
      Implementation Note:
      By default, this delegates all logics to Entity.baseTick().
      Mappings:
      Namespace Name Mixin selector
      named tick Lnet/minecraft/entity/Entity;tick()V
      intermediary method_5773 Lnet/minecraft/class_1297;method_5773()V
      official l Lbsq;l()V
    • getLogic

      public MobSpawnerLogic getLogic()
      Mappings:
      Namespace Name Mixin selector
      named getLogic Lnet/minecraft/entity/vehicle/SpawnerMinecartEntity;getLogic()Lnet/minecraft/block/spawner/MobSpawnerLogic;
      intermediary method_35216 Lnet/minecraft/class_1699;method_35216()Lnet/minecraft/class_1917;
      official B Lcpc;B()Ldbw;
    • entityDataRequiresOperator

      public boolean entityDataRequiresOperator()
      Returns whether EntityType.loadFromEntityNbt(net.minecraft.world.World, net.minecraft.entity.player.PlayerEntity, net.minecraft.entity.Entity, net.minecraft.component.type.NbtComponent) should reject entity NBTs unless called by an operator.

      This is false by default, and should be overridden if the entity provides functionality that is usually restricted to operators (such as CommandBlockMinecartEntity).

      Overrides:
      entityDataRequiresOperator in class Entity
      Returns:
      whether EntityType.loadFromEntityNbt(net.minecraft.world.World, net.minecraft.entity.player.PlayerEntity, net.minecraft.entity.Entity, net.minecraft.component.type.NbtComponent) should reject entity NBTs unless called by an operator
      Mappings:
      Namespace Name Mixin selector
      named entityDataRequiresOperator Lnet/minecraft/entity/Entity;entityDataRequiresOperator()Z
      intermediary method_5833 Lnet/minecraft/class_1297;method_5833()Z
      official cQ Lbsq;cQ()Z