Package net.minecraft.inventory
Class EnderChestInventory
java.lang.Object
net.minecraft.inventory.SimpleInventory
net.minecraft.inventory.EnderChestInventory
- All Implemented Interfaces:
Inventory
,RecipeInputProvider
,Clearable
Represents an inventory used for ender chests.
A new instance is created for each player.
- Mappings:
Namespace Name official cjn
intermediary net/minecraft/class_1730
named net/minecraft/inventory/EnderChestInventory
-
Field Summary
Fields inherited from interface net.minecraft.inventory.Inventory
field_42619, MAX_COUNT_PER_STACK
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canPlayerUse
(PlayerEntity player) Returns whetherplayer
can use this inventory.boolean
isActiveBlockEntity
(EnderChestBlockEntity blockEntity) Returns whether this inventory is being accessed fromblockEntity
.void
onClose
(PlayerEntity player) Called when the inventory is closed.void
onOpen
(PlayerEntity player) Called when the inventory is opened.void
readNbtList
(NbtList nbtList) Reads the item stacks fromnbtList
.void
setActiveBlockEntity
(EnderChestBlockEntity blockEntity) Sets the block entity the player is using to access the inventory toblockEntity
.Returns an NBT list of non-empty item stacks.Methods inherited from class net.minecraft.inventory.SimpleInventory
addListener, addStack, canInsert, clear, clearToList, getHeldStacks, getStack, isEmpty, markDirty, provideRecipeInputs, removeItem, removeListener, removeStack, removeStack, setStack, size, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.inventory.Inventory
canTransferTo, containsAny, containsAny, count, getMaxCountPerStack, isValid
-
Field Details
-
activeBlockEntity
- Mappings:
Namespace Name Mixin selector official c
Lcjn;c:Ldhq;
intermediary field_7864
Lnet/minecraft/class_1730;field_7864:Lnet/minecraft/class_2611;
named activeBlockEntity
Lnet/minecraft/inventory/EnderChestInventory;activeBlockEntity:Lnet/minecraft/block/entity/EnderChestBlockEntity;
-
-
Constructor Details
-
EnderChestInventory
public EnderChestInventory()
-
-
Method Details
-
setActiveBlockEntity
Sets the block entity the player is using to access the inventory toblockEntity
. The block entity is used to delegatecanPlayerUse(net.minecraft.entity.player.PlayerEntity)
,onOpen(net.minecraft.entity.player.PlayerEntity)
, andonClose(net.minecraft.entity.player.PlayerEntity)
.- Mappings:
Namespace Name Mixin selector official a
Lcjn;a(Ldhq;)V
intermediary method_7661
Lnet/minecraft/class_1730;method_7661(Lnet/minecraft/class_2611;)V
named setActiveBlockEntity
Lnet/minecraft/inventory/EnderChestInventory;setActiveBlockEntity(Lnet/minecraft/block/entity/EnderChestBlockEntity;)V
-
isActiveBlockEntity
Returns whether this inventory is being accessed fromblockEntity
.- Returns:
- whether this inventory is being accessed from
blockEntity
- Mappings:
Namespace Name Mixin selector official b
Lcjn;b(Ldhq;)Z
intermediary method_31556
Lnet/minecraft/class_1730;method_31556(Lnet/minecraft/class_2611;)Z
named isActiveBlockEntity
Lnet/minecraft/inventory/EnderChestInventory;isActiveBlockEntity(Lnet/minecraft/block/entity/EnderChestBlockEntity;)Z
-
readNbtList
Reads the item stacks fromnbtList
.- Overrides:
readNbtList
in classSimpleInventory
- See Also:
- Mappings:
Namespace Name Mixin selector official a
Lbkj;a(Lst;)V
intermediary method_7659
Lnet/minecraft/class_1277;method_7659(Lnet/minecraft/class_2499;)V
named readNbtList
Lnet/minecraft/inventory/SimpleInventory;readNbtList(Lnet/minecraft/nbt/NbtList;)V
-
toNbtList
Returns an NBT list of non-empty item stacks.Unlike
Inventories.writeNbt(NbtCompound, DefaultedList, boolean)
, this does not serialize the slots.- Overrides:
toNbtList
in classSimpleInventory
- Returns:
- an NBT list of non-empty item stacks
- See Also:
- Mappings:
Namespace Name Mixin selector official g
Lbkj;g()Lst;
intermediary method_7660
Lnet/minecraft/class_1277;method_7660()Lnet/minecraft/class_2499;
named toNbtList
Lnet/minecraft/inventory/SimpleInventory;toNbtList()Lnet/minecraft/nbt/NbtList;
-
canPlayerUse
Returns whetherplayer
can use this inventory.This is called by
ScreenHandler.canUse(net.minecraft.screen.ScreenHandlerContext, net.minecraft.entity.player.PlayerEntity, net.minecraft.block.Block)
.- Specified by:
canPlayerUse
in interfaceInventory
- Overrides:
canPlayerUse
in classSimpleInventory
- Returns:
- whether
player
can use this inventory - See Also:
- Mappings:
Namespace Name Mixin selector official a
Lbju;a(Lcfi;)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
-
onOpen
Called when the inventory is opened. Specifically, this is called inside theScreenHandler
constructor. 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 official d_
Lbju;d_(Lcfi;)V
intermediary method_5435
Lnet/minecraft/class_1263;method_5435(Lnet/minecraft/class_1657;)V
named onOpen
Lnet/minecraft/inventory/Inventory;onOpen(Lnet/minecraft/entity/player/PlayerEntity;)V
-
onClose
Called when the inventory is closed. Specifically, this is called insideScreenHandler.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 official c
Lbju;c(Lcfi;)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
-