Class HopperMinecartEntity

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

public class HopperMinecartEntity extends StorageMinecartEntity implements Hopper
Mappings:
Namespace Name
named net/minecraft/entity/vehicle/HopperMinecartEntity
intermediary net/minecraft/class_1700
official cor
  • Field Details

    • enabled

      private boolean enabled
      Mappings:
      Namespace Name Mixin selector
      named enabled Lnet/minecraft/entity/vehicle/HopperMinecartEntity;enabled:Z
      intermediary field_7749 Lnet/minecraft/class_1700;field_7749:Z
      official c Lcor;c:Z
  • Constructor Details

    • HopperMinecartEntity

      public HopperMinecartEntity(EntityType<? extends HopperMinecartEntity> 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> Lbsh;<init>(Lbsn;Ldcg;)V
    • HopperMinecartEntity

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

    • 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 Lcog;v()Lcog$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 Lcog;x()Ldsl;
    • 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 Lcog;z()I
    • 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.

      Specified by:
      size in interface Inventory
      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 Lbqa;b()I
    • onActivatorRail

      public void onActivatorRail(int x, int y, int z, boolean powered)
      Overrides:
      onActivatorRail in class AbstractMinecartEntity
      Mappings:
      Namespace Name Mixin selector
      named onActivatorRail Lnet/minecraft/entity/vehicle/AbstractMinecartEntity;onActivatorRail(IIIZ)V
      intermediary method_7506 Lnet/minecraft/class_1688;method_7506(IIIZ)V
      official a Lcog;a(IIIZ)V
    • isEnabled

      public boolean isEnabled()
      Mappings:
      Namespace Name Mixin selector
      named isEnabled Lnet/minecraft/entity/vehicle/HopperMinecartEntity;isEnabled()Z
      intermediary method_7572 Lnet/minecraft/class_1700;method_7572()Z
      official F Lcor;F()Z
    • setEnabled

      public void setEnabled(boolean enabled)
      Mappings:
      Namespace Name Mixin selector
      named setEnabled Lnet/minecraft/entity/vehicle/HopperMinecartEntity;setEnabled(Z)V
      intermediary method_7570 Lnet/minecraft/class_1700;method_7570(Z)V
      official b Lcor;b(Z)V
    • getHopperX

      public double getHopperX()
      Specified by:
      getHopperX in interface Hopper
      Mappings:
      Namespace Name Mixin selector
      named getHopperX Lnet/minecraft/block/entity/Hopper;getHopperX()D
      intermediary method_11266 Lnet/minecraft/class_2615;method_11266()D
      official H Ldqp;H()D
    • getHopperY

      public double getHopperY()
      Specified by:
      getHopperY in interface Hopper
      Mappings:
      Namespace Name Mixin selector
      named getHopperY Lnet/minecraft/block/entity/Hopper;getHopperY()D
      intermediary method_11264 Lnet/minecraft/class_2615;method_11264()D
      official I Ldqp;I()D
    • getHopperZ

      public double getHopperZ()
      Specified by:
      getHopperZ in interface Hopper
      Mappings:
      Namespace Name Mixin selector
      named getHopperZ Lnet/minecraft/block/entity/Hopper;getHopperZ()D
      intermediary method_11265 Lnet/minecraft/class_2615;method_11265()D
      official J Ldqp;J()D
    • canBlockFromAbove

      public boolean canBlockFromAbove()
      Specified by:
      canBlockFromAbove in interface Hopper
      Mappings:
      Namespace Name Mixin selector
      named canBlockFromAbove Lnet/minecraft/block/entity/Hopper;canBlockFromAbove()Z
      intermediary method_57081 Lnet/minecraft/class_2615;method_57081()Z
      official K Ldqp;K()Z
    • 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 Lbsh;l()V
    • canOperate

      public boolean canOperate()
      Mappings:
      Namespace Name Mixin selector
      named canOperate Lnet/minecraft/entity/vehicle/HopperMinecartEntity;canOperate()Z
      intermediary method_7574 Lnet/minecraft/class_1700;method_7574()Z
      official L Lcor;L()Z
    • 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_ Lcou;ag_()Lcty;
    • 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 StorageMinecartEntity
      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 Lbsh;b(Ltx;)V
    • 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 StorageMinecartEntity
      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 Lbsh;a(Ltx;)V
    • 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 Lcoh;a(ILcmk;)Lcpi;