Class ChestMinecartEntity

All Implemented Interfaces:
DataTracked, VehicleInventory, Inventory, ScoreHolder, NamedScreenHandlerFactory, ScreenHandlerFactory, CommandOutput, Clearable, Nameable, EntityLike

public class ChestMinecartEntity extends StorageMinecartEntity
Mappings:
Namespace Name
named net/minecraft/entity/vehicle/ChestMinecartEntity
intermediary net/minecraft/class_1694
official cpa
  • Constructor Details

    • ChestMinecartEntity

      public ChestMinecartEntity(EntityType<? extends ChestMinecartEntity> 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
    • ChestMinecartEntity

      public ChestMinecartEntity(World world, double x, double y, double z)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/vehicle/ChestMinecartEntity;<init>(Lnet/minecraft/world/World;DDD)V
      intermediary <init> Lnet/minecraft/class_1694;<init>(Lnet/minecraft/class_1937;DDD)V
      official <init> Lcpa;<init>(Ldcw;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 ak_ Lcpg;ak_()Lcul;
    • size

      public int size()
      Returns the size of the inventory.

      The inventory should support the slot ID from 0 to size() - 1. This should remain constant throughout the inventory's lifetime.

      Returns:
      the size of the inventory
      Mappings:
      Namespace Name Mixin selector
      named size Lnet/minecraft/inventory/Inventory;size()I
      intermediary method_5439 Lnet/minecraft/class_1263;method_5439()I
      official b Lbqk;b()I
    • 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 Lcot;v()Lcot$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 Lcot;x()Ldtc;
    • getDefaultBlockOffset

      public int getDefaultBlockOffset()
      Overrides:
      getDefaultBlockOffset in class AbstractMinecartEntity
      Mappings:
      Namespace Name Mixin selector
      named getDefaultBlockOffset Lnet/minecraft/entity/vehicle/AbstractMinecartEntity;getDefaultBlockOffset()I
      intermediary method_7526 Lnet/minecraft/class_1688;method_7526()I
      official z Lcot;z()I
    • getScreenHandler

      public ScreenHandler getScreenHandler(int syncId, PlayerInventory playerInventory)
      Specified by:
      getScreenHandler in class StorageMinecartEntity
      Mappings:
      Namespace Name Mixin selector
      named getScreenHandler Lnet/minecraft/entity/vehicle/StorageMinecartEntity;getScreenHandler(ILnet/minecraft/entity/player/PlayerInventory;)Lnet/minecraft/screen/ScreenHandler;
      intermediary method_17357 Lnet/minecraft/class_1693;method_17357(ILnet/minecraft/class_1661;)Lnet/minecraft/class_1703;
      official a Lcou;a(ILcmw;)Lcpu;
    • onClose

      public void onClose(PlayerEntity player)
      Called when the inventory is closed. Specifically, this is called inside ScreenHandler.onClosed(net.minecraft.entity.player.PlayerEntity). This does nothing by default.

      The method is called in both the client and the server. However, because clientside screen handler is created with a SimpleInventory, other implementations can (and the vanilla code does) assume that the method is called in the server.

      Mappings:
      Namespace Name Mixin selector
      named onClose Lnet/minecraft/inventory/Inventory;onClose(Lnet/minecraft/entity/player/PlayerEntity;)V
      intermediary method_5432 Lnet/minecraft/class_1263;method_5432(Lnet/minecraft/class_1657;)V
      official c Lbqk;c(Lcmx;)V
    • interact

      public ActionResult interact(PlayerEntity player, Hand hand)
      Called when a player interacts with this entity.
      Overrides:
      interact in class StorageMinecartEntity
      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;