Class HopperMinecartEntity

All Implemented Interfaces:
Hopper, DataTracked, VehicleInventory, Inventory, ScoreHolder, NamedScreenHandlerFactory, ScreenHandlerFactory, 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 csh
  • 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 Lcsh;c:Z
    • hopperTicked

      private boolean hopperTicked
      Mappings:
      Namespace Name Mixin selector
      named hopperTicked Lnet/minecraft/entity/vehicle/HopperMinecartEntity;hopperTicked:Z
      intermediary field_52523 Lnet/minecraft/class_1700;field_52523:Z
      official d Lcsh;d: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> Lbvj;<init>(Lbvq;Ldhh;)V
  • Method Details

    • 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 w Lcrv;w()Ldxu;
    • 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 Lcrv;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 Lbtb;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 Lcrv;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 Lcsh;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 s Lcsh;s(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 G Ldvx;G()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 H Ldvx;H()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 I Ldvx;I()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 J Ldvx;J()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 h Lbvj;h()V
    • moveAlongTrack

      protected double moveAlongTrack(BlockPos pos, RailShape shape, double remainingMovement)
      Overrides:
      moveAlongTrack in class AbstractMinecartEntity
      Mappings:
      Namespace Name Mixin selector
      named moveAlongTrack Lnet/minecraft/entity/vehicle/AbstractMinecartEntity;moveAlongTrack(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/enums/RailShape;D)D
      intermediary method_61564 Lnet/minecraft/class_1688;method_61564(Lnet/minecraft/class_2338;Lnet/minecraft/class_2768;D)D
      official a Lcrv;a(Ljh;Ldyx;D)D
    • tickHopper

      private void tickHopper()
      Mappings:
      Namespace Name Mixin selector
      named tickHopper Lnet/minecraft/entity/vehicle/HopperMinecartEntity;tickHopper()V
      intermediary method_61600 Lnet/minecraft/class_1700;method_61600()V
      official P Lcsh;P()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 K Lcsh;K()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 u Lcsn;u()Lcxk;
    • getPickBlockStack

      public ItemStack getPickBlockStack()
      Returns the stack for creative "pick block" functionality, or null if there is none.

      If the entity has an item representation (such as boats or minecarts), this should be overridden to return a new stack. Note that MobEntity handles the spawn eggs. ItemFrameEntity instead returns the copy of the stack held in the frame.

      Specified by:
      getPickBlockStack in class AbstractMinecartEntity
      Returns:
      the stack for creative "pick block" functionality, or null if there is none
      Mappings:
      Namespace Name Mixin selector
      named getPickBlockStack Lnet/minecraft/entity/Entity;getPickBlockStack()Lnet/minecraft/item/ItemStack;
      intermediary method_31480 Lnet/minecraft/class_1297;method_31480()Lnet/minecraft/class_1799;
      official dJ Lbvj;dJ()Lcxo;
    • 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 Lbvj;b(Lux;)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 Lbvj;a(Lux;)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 Lcrw;a(ILcpv;)Lctb;