Class ChestBoatEntity

All Implemented Interfaces:
RideableInventory, VariantHolder<BoatEntity.Type>, VehicleInventory, Inventory, NamedScreenHandlerFactory, ScreenHandlerFactory, CommandOutput, Clearable, Nameable, EntityLike

public class ChestBoatEntity extends BoatEntity implements RideableInventory, VehicleInventory
Mappings:
Namespace Name
official cag
intermediary net/minecraft/class_7264
named net/minecraft/entity/vehicle/ChestBoatEntity
  • Field Details

    • INVENTORY_SIZE

      private static final int INVENTORY_SIZE
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official f Lcag;f:I
      intermediary field_38207 Lnet/minecraft/class_7264;field_38207:I
      named INVENTORY_SIZE Lnet/minecraft/entity/vehicle/ChestBoatEntity;INVENTORY_SIZE:I
    • inventory

      private DefaultedList<ItemStack> inventory
      Mappings:
      Namespace Name Mixin selector
      official g Lcag;g:Lhn;
      intermediary field_38204 Lnet/minecraft/class_7264;field_38204:Lnet/minecraft/class_2371;
      named inventory Lnet/minecraft/entity/vehicle/ChestBoatEntity;inventory:Lnet/minecraft/util/collection/DefaultedList;
    • lootTableId

      @Nullable private @Nullable Identifier lootTableId
      Mappings:
      Namespace Name Mixin selector
      official h Lcag;h:Lacq;
      intermediary field_38205 Lnet/minecraft/class_7264;field_38205:Lnet/minecraft/class_2960;
      named lootTableId Lnet/minecraft/entity/vehicle/ChestBoatEntity;lootTableId:Lnet/minecraft/util/Identifier;
    • lootTableSeed

      private long lootTableSeed
      Mappings:
      Namespace Name Mixin selector
      official i Lcag;i:J
      intermediary field_38206 Lnet/minecraft/class_7264;field_38206:J
      named lootTableSeed Lnet/minecraft/entity/vehicle/ChestBoatEntity;lootTableSeed:J
  • Constructor Details

    • ChestBoatEntity

      public ChestBoatEntity(EntityType<? extends BoatEntity> type, World world)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lbfh;<init>(Lbfl;Lcmk;)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
    • ChestBoatEntity

      public ChestBoatEntity(World world, double x, double y, double z)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lcaf;<init>(Lcmk;DDD)V
      intermediary <init> Lnet/minecraft/class_1690;<init>(Lnet/minecraft/class_1937;DDD)V
      named <init> Lnet/minecraft/entity/vehicle/BoatEntity;<init>(Lnet/minecraft/world/World;DDD)V
  • Method Details

    • getPassengerHorizontalOffset

      protected float getPassengerHorizontalOffset()
      Overrides:
      getPassengerHorizontalOffset in class BoatEntity
      Mappings:
      Namespace Name Mixin selector
      official p Lcaf;p()F
      intermediary method_42280 Lnet/minecraft/class_1690;method_42280()F
      named getPassengerHorizontalOffset Lnet/minecraft/entity/vehicle/BoatEntity;getPassengerHorizontalOffset()F
    • getMaxPassengers

      protected int getMaxPassengers()
      Overrides:
      getMaxPassengers in class BoatEntity
      Mappings:
      Namespace Name Mixin selector
      official v Lcaf;v()I
      intermediary method_42281 Lnet/minecraft/class_1690;method_42281()I
      named getMaxPassengers Lnet/minecraft/entity/vehicle/BoatEntity;getMaxPassengers()I
    • 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.

      Overrides:
      writeCustomDataToNbt in class BoatEntity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official b Lbfh;b(Lqr;)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
    • 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.

      Overrides:
      readCustomDataFromNbt in class BoatEntity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Lbfh;a(Lqr;)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
    • dropItems

      public void dropItems(DamageSource source)
      Overrides:
      dropItems in class BoatEntity
      Mappings:
      Namespace Name Mixin selector
      official a Lcaf;a(Lbem;)V
      intermediary method_42279 Lnet/minecraft/class_1690;method_42279(Lnet/minecraft/class_1282;)V
      named dropItems Lnet/minecraft/entity/vehicle/BoatEntity;dropItems(Lnet/minecraft/entity/damage/DamageSource;)V
    • remove

      public void remove(Entity.RemovalReason reason)
      Removes the entity.
      Overrides:
      remove in class Entity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Lbfh;a(Lbfh$c;)V
      intermediary method_5650 Lnet/minecraft/class_1297;method_5650(Lnet/minecraft/class_1297$class_5529;)V
      named remove Lnet/minecraft/entity/Entity;remove(Lnet/minecraft/entity/Entity$RemovalReason;)V
    • interact

      public ActionResult interact(PlayerEntity player, Hand hand)
      Called when a player interacts with this entity.
      Overrides:
      interact in class BoatEntity
      Parameters:
      player - the player
      hand - the hand the player used to interact with this entity
      Mappings:
      Namespace Name Mixin selector
      official a Lbfh;a(Lbym;Lbdv;)Lbdw;
      intermediary method_5688 Lnet/minecraft/class_1297;method_5688(Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;)Lnet/minecraft/class_1269;
      named interact Lnet/minecraft/entity/Entity;interact(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;)Lnet/minecraft/util/ActionResult;
    • openInventory

      public void openInventory(PlayerEntity player)
      Specified by:
      openInventory in interface RideableInventory
      Mappings:
      Namespace Name Mixin selector
      official b Lbfq;b(Lbym;)V
      intermediary method_6722 Lnet/minecraft/class_7248;method_6722(Lnet/minecraft/class_1657;)V
      named openInventory Lnet/minecraft/entity/RideableInventory;openInventory(Lnet/minecraft/entity/player/PlayerEntity;)V
    • asItem

      public Item asItem()
      Overrides:
      asItem in class BoatEntity
      Mappings:
      Namespace Name Mixin selector
      official i Lcaf;i()Lcfs;
      intermediary method_7557 Lnet/minecraft/class_1690;method_7557()Lnet/minecraft/class_1792;
      named asItem Lnet/minecraft/entity/vehicle/BoatEntity;asItem()Lnet/minecraft/item/Item;
    • clear

      public void clear()
      Specified by:
      clear in interface Clearable
      Mappings:
      Namespace Name Mixin selector
      official a Lbdn;a()V
      intermediary method_5448 Lnet/minecraft/class_3829;method_5448()V
      named clear Lnet/minecraft/util/Clearable;clear()V
    • size

      public int size()
      Specified by:
      size in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official b Lbdp;b()I
      intermediary method_5439 Lnet/minecraft/class_1263;method_5439()I
      named size Lnet/minecraft/inventory/Inventory;size()I
    • getStack

      public ItemStack getStack(int slot)
      Fetches the stack currently stored at the given slot. If the slot is empty, or is outside the bounds of this inventory, returns see ItemStack.EMPTY.
      Specified by:
      getStack in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official a Lbdp;a(I)Lcfx;
      intermediary method_5438 Lnet/minecraft/class_1263;method_5438(I)Lnet/minecraft/class_1799;
      named getStack Lnet/minecraft/inventory/Inventory;getStack(I)Lnet/minecraft/item/ItemStack;
    • removeStack

      public ItemStack removeStack(int slot, int amount)
      Removes a specific number of items from the given slot.
      Specified by:
      removeStack in interface Inventory
      Returns:
      the removed items as a stack
      Mappings:
      Namespace Name Mixin selector
      official a Lbdp;a(II)Lcfx;
      intermediary method_5434 Lnet/minecraft/class_1263;method_5434(II)Lnet/minecraft/class_1799;
      named removeStack Lnet/minecraft/inventory/Inventory;removeStack(II)Lnet/minecraft/item/ItemStack;
    • removeStack

      public ItemStack removeStack(int slot)
      Removes the stack currently stored at the indicated slot.
      Specified by:
      removeStack in interface Inventory
      Returns:
      the stack previously stored at the indicated slot.
      Mappings:
      Namespace Name Mixin selector
      official b Lbdp;b(I)Lcfx;
      intermediary method_5441 Lnet/minecraft/class_1263;method_5441(I)Lnet/minecraft/class_1799;
      named removeStack Lnet/minecraft/inventory/Inventory;removeStack(I)Lnet/minecraft/item/ItemStack;
    • setStack

      public void setStack(int slot, ItemStack stack)
      Specified by:
      setStack in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official a Lbdp;a(ILcfx;)V
      intermediary method_5447 Lnet/minecraft/class_1263;method_5447(ILnet/minecraft/class_1799;)V
      named setStack Lnet/minecraft/inventory/Inventory;setStack(ILnet/minecraft/item/ItemStack;)V
    • getStackReference

      public StackReference getStackReference(int mappedIndex)
      Obtains a stack reference to be modified. Used by commands like /loot or /item.
      Overrides:
      getStackReference in class Entity
      Parameters:
      mappedIndex - the mapped index as given by the item slot argument
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a_ Lbfh;a_(I)Lbgq;
      intermediary method_32318 Lnet/minecraft/class_1297;method_32318(I)Lnet/minecraft/class_5630;
      named getStackReference Lnet/minecraft/entity/Entity;getStackReference(I)Lnet/minecraft/inventory/StackReference;
    • markDirty

      public void markDirty()
      Specified by:
      markDirty in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official e Lbdp;e()V
      intermediary method_5431 Lnet/minecraft/class_1263;method_5431()V
      named markDirty Lnet/minecraft/inventory/Inventory;markDirty()V
    • canPlayerUse

      public boolean canPlayerUse(PlayerEntity player)
      Specified by:
      canPlayerUse in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official a Lbdp;a(Lbym;)Z
      intermediary method_5443 Lnet/minecraft/class_1263;method_5443(Lnet/minecraft/class_1657;)Z
      named canPlayerUse Lnet/minecraft/inventory/Inventory;canPlayerUse(Lnet/minecraft/entity/player/PlayerEntity;)Z
    • createMenu

      @Nullable public @Nullable ScreenHandler createMenu(int syncId, PlayerInventory playerInventory, PlayerEntity player)
      Specified by:
      createMenu in interface ScreenHandlerFactory
      Mappings:
      Namespace Name Mixin selector
      official createMenu Lcch;createMenu(ILbyl;Lbym;)Lcbd;
      intermediary createMenu Lnet/minecraft/class_1270;createMenu(ILnet/minecraft/class_1661;Lnet/minecraft/class_1657;)Lnet/minecraft/class_1703;
      named createMenu Lnet/minecraft/screen/ScreenHandlerFactory;createMenu(ILnet/minecraft/entity/player/PlayerInventory;Lnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/screen/ScreenHandler;
    • generateLoot

      public void generateLoot(@Nullable @Nullable PlayerEntity player)
      Mappings:
      Namespace Name Mixin selector
      official e Lcag;e(Lbym;)V
      intermediary method_42282 Lnet/minecraft/class_7264;method_42282(Lnet/minecraft/class_1657;)V
      named generateLoot Lnet/minecraft/entity/vehicle/ChestBoatEntity;generateLoot(Lnet/minecraft/entity/player/PlayerEntity;)V
    • getLootTableId

      @Nullable public @Nullable Identifier getLootTableId()
      Specified by:
      getLootTableId in interface VehicleInventory
      Mappings:
      Namespace Name Mixin selector
      official z Lcah;z()Lacq;
      intermediary method_42276 Lnet/minecraft/class_7265;method_42276()Lnet/minecraft/class_2960;
      named getLootTableId Lnet/minecraft/entity/vehicle/VehicleInventory;getLootTableId()Lnet/minecraft/util/Identifier;
    • setLootTableId

      public void setLootTableId(@Nullable @Nullable Identifier lootTableId)
      Specified by:
      setLootTableId in interface VehicleInventory
      Mappings:
      Namespace Name Mixin selector
      official a Lcah;a(Lacq;)V
      intermediary method_42275 Lnet/minecraft/class_7265;method_42275(Lnet/minecraft/class_2960;)V
      named setLootTableId Lnet/minecraft/entity/vehicle/VehicleInventory;setLootTableId(Lnet/minecraft/util/Identifier;)V
    • getLootTableSeed

      public long getLootTableSeed()
      Specified by:
      getLootTableSeed in interface VehicleInventory
      Mappings:
      Namespace Name Mixin selector
      official A Lcah;A()J
      intermediary method_42277 Lnet/minecraft/class_7265;method_42277()J
      named getLootTableSeed Lnet/minecraft/entity/vehicle/VehicleInventory;getLootTableSeed()J
    • setLootTableSeed

      public void setLootTableSeed(long lootTableSeed)
      Specified by:
      setLootTableSeed in interface VehicleInventory
      Mappings:
      Namespace Name Mixin selector
      official a Lcah;a(J)V
      intermediary method_42274 Lnet/minecraft/class_7265;method_42274(J)V
      named setLootTableSeed Lnet/minecraft/entity/vehicle/VehicleInventory;setLootTableSeed(J)V
    • getInventory

      public DefaultedList<ItemStack> getInventory()
      Specified by:
      getInventory in interface VehicleInventory
      Mappings:
      Namespace Name Mixin selector
      official C Lcah;C()Lhn;
      intermediary method_42278 Lnet/minecraft/class_7265;method_42278()Lnet/minecraft/class_2371;
      named getInventory Lnet/minecraft/entity/vehicle/VehicleInventory;getInventory()Lnet/minecraft/util/collection/DefaultedList;
    • resetInventory

      public void resetInventory()
      Specified by:
      resetInventory in interface VehicleInventory
      Mappings:
      Namespace Name Mixin selector
      official D Lcah;D()V
      intermediary method_42273 Lnet/minecraft/class_7265;method_42273()V
      named resetInventory Lnet/minecraft/entity/vehicle/VehicleInventory;resetInventory()V
    • onClose

      public void onClose(PlayerEntity player)
      Specified by:
      onClose in interface Inventory
      Mappings:
      Namespace Name Mixin selector
      official c Lbdp;c(Lbym;)V
      intermediary method_5432 Lnet/minecraft/class_1263;method_5432(Lnet/minecraft/class_1657;)V
      named onClose Lnet/minecraft/inventory/Inventory;onClose(Lnet/minecraft/entity/player/PlayerEntity;)V