Class EnderChestInventory
- All Implemented Interfaces:
Inventory,RecipeInputProvider,Clearable
- Mappings:
Namespace Name named net/minecraft/inventory/EnderChestInventoryintermediary net/minecraft/class_1730official crh
-
Field Summary
FieldsFields inherited from interface net.minecraft.inventory.Inventory
DEFAULT_MAX_INTERACTION_RANGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanPlayerUse(PlayerEntity player) Returns whetherplayercan use this inventory.booleanisActiveBlockEntity(EnderChestBlockEntity blockEntity) Returns whether this inventory is being accessed fromblockEntity.voidonClose(PlayerEntity player) Called when the inventory is closed.voidonOpen(PlayerEntity player) Called when the inventory is opened.voidreadNbtList(NbtList list, RegistryWrapper.WrapperLookup registries) Reads the item stacks fromnbtList.voidsetActiveBlockEntity(EnderChestBlockEntity blockEntity) Sets the block entity the player is using to access the inventory toblockEntity.toNbtList(RegistryWrapper.WrapperLookup registries) Returns an NBT list of non-empty.invalid reference
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, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.inventory.Inventory
canTransferTo, containsAny, containsAny, count, getMaxCount, getMaxCountPerStack, isValid
-
Field Details
-
activeBlockEntity
- Mappings:
Namespace Name Mixin selector named activeBlockEntityLnet/minecraft/inventory/EnderChestInventory;activeBlockEntity:Lnet/minecraft/block/entity/EnderChestBlockEntity;intermediary field_7864Lnet/minecraft/class_1730;field_7864:Lnet/minecraft/class_2611;official bLcrh;b:Ldrd;
-
-
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 named setActiveBlockEntityLnet/minecraft/inventory/EnderChestInventory;setActiveBlockEntity(Lnet/minecraft/block/entity/EnderChestBlockEntity;)Vintermediary method_7661Lnet/minecraft/class_1730;method_7661(Lnet/minecraft/class_2611;)Vofficial aLcrh;a(Ldrd;)V
-
isActiveBlockEntity
Returns whether this inventory is being accessed fromblockEntity.- Returns:
- whether this inventory is being accessed from
blockEntity - Mappings:
Namespace Name Mixin selector named isActiveBlockEntityLnet/minecraft/inventory/EnderChestInventory;isActiveBlockEntity(Lnet/minecraft/block/entity/EnderChestBlockEntity;)Zintermediary method_31556Lnet/minecraft/class_1730;method_31556(Lnet/minecraft/class_2611;)Zofficial bLcrh;b(Ldrd;)Z
-
readNbtList
Reads the item stacks fromnbtList.- Overrides:
readNbtListin classSimpleInventory- See Also:
- Mappings:
Namespace Name Mixin selector named readNbtListLnet/minecraft/inventory/SimpleInventory;readNbtList(Lnet/minecraft/nbt/NbtList;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Vintermediary method_7659Lnet/minecraft/class_1277;method_7659(Lnet/minecraft/class_2499;Lnet/minecraft/class_7225$class_7874;)Vofficial aLbra;a(Luh;Ljo$a;)V
-
toNbtList
Returns an NBT list of non-empty.invalid reference
item stacks
Unlike
Inventories.writeNbt(NbtCompound, DefaultedList, boolean, RegistryWrapper.WrapperLookup), this does not serialize the slots.- Overrides:
toNbtListin classSimpleInventory- Returns:
- an NBT list of non-empty
invalid reference
item stacks
- See Also:
- Mappings:
Namespace Name Mixin selector named toNbtListLnet/minecraft/inventory/SimpleInventory;toNbtList(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lnet/minecraft/nbt/NbtList;intermediary method_7660Lnet/minecraft/class_1277;method_7660(Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_2499;official aLbra;a(Ljo$a;)Luh;
-
canPlayerUse
Returns whetherplayercan use this inventory.This is called by
ScreenHandler.canUse(net.minecraft.screen.ScreenHandlerContext, net.minecraft.entity.player.PlayerEntity, net.minecraft.block.Block).- Specified by:
canPlayerUsein interfaceInventory- Overrides:
canPlayerUsein classSimpleInventory- Returns:
- whether
playercan use this inventory - See Also:
- API Note:
- Implementations should check the distance between the inventory
holder and
player. For convenience, this interface offers two methods used by block entities to implement this check. - Mappings:
Namespace Name Mixin selector named canPlayerUseLnet/minecraft/inventory/Inventory;canPlayerUse(Lnet/minecraft/entity/player/PlayerEntity;)Zintermediary method_5443Lnet/minecraft/class_1263;method_5443(Lnet/minecraft/class_1657;)Zofficial aLbqk;a(Lcmx;)Z
-
onOpen
Called when the inventory is opened. Specifically, this is called inside theScreenHandlerconstructor. 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 onOpenLnet/minecraft/inventory/Inventory;onOpen(Lnet/minecraft/entity/player/PlayerEntity;)Vintermediary method_5435Lnet/minecraft/class_1263;method_5435(Lnet/minecraft/class_1657;)Vofficial d_Lbqk;d_(Lcmx;)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 named onCloseLnet/minecraft/inventory/Inventory;onClose(Lnet/minecraft/entity/player/PlayerEntity;)Vintermediary method_5432Lnet/minecraft/class_1263;method_5432(Lnet/minecraft/class_1657;)Vofficial cLbqk;c(Lcmx;)V
-