Skip to content

Inventory Controller v2.0

Overview

You can use it to control items stored in the inventory of a block like a chest, furnace, and dispenser, or a player's inventory.

Ports Definition

Top Output

Bit Width UsedFunctionDescription
32

Result

Because the result is often 0, the default result is 0xFFFFFFFF V. If there is an error occupied during controlling, the result will be 0xFFFFFFFF V too.

Right Input

Start & EndFunctionDescription
1 ~ 8

Slot

Specify the n+1th slot to control.

9 ~ 16

Count

Specify how many items to control.

17

Whether Check Block Data

SeeBlock Data

18

Whether Control All

If this is 1, the element will ignoreCount in operation, and will control as much as possible.

19

Whether Control Player's Inventory

If this is 0, this element controls the inventory of the behind block. Otherwise, the element controls the specified player's inventory.

20 ~ 24

Player Index

Specify which number player's inventory you want to control whenWhether Control Player's Inventoryis 1.

25 ~ 32

New Slot

Specify the n+1th slot as the new slot whenSynchronous Operationsis 16(0x10).

Bottom Input

Bit Width UsedFunctionDescription
32

Synchronous Operations

Details are in the table below.

Left Input

Start & EndFunctionDescription
1 ~ 10

Block Content

If this is greater than 0, the element will only control the item with the same block content.

11 ~ 14

Empty

No effect.

15 ~ 32

Block Data

IfBlock Contentis greater than 0 andWhether Check Block Datais 1, the element will also check whether the block data of items equals to this.

Synchronous Operations

VoltageOpertaion & Description
0 or
Others
Only if the voltage of the bottom port changes, the operation will be executed. The default output is 0xFFFFFFFF V. If there is an error occupied during controlling, the result will be 0xFFFFFFFF V too.
1Output the block value of the items in the specified slot.
2Output the count of the items in the specified slot.
3Output the capacity of the items in the specified slot.
4Output the remaining capacity of the items in the specified slot.
5Output the total count of the items with the specified block.
6Output the slot number of the first slot that contains the item with the specified block.
7Output the count of the slots that contains the items with the specified block.
8Output the count of the items with the same block content and data that can be added. (The block data is considered and will not be ignored.)
9Output the total count of slots.
10
(0xA)
Output the count of used slots.
11
(0xB)
Output the count of unused slots.
12
(0xC)
Output the first slot number that contains at least one item.
13
(0xD)
Output the last slot number that contains at least one item.
14
(0xE)
Output the first slot number that does not contain item.
15
(0xF)
Output the last slot number that does not contain item.
16
(0x10)
Move the items from a lot to a new slot. You should specify the count of items to move. The output will be the count of items actually moved.
If the new slot already has items, it will try to move items to other available slots.
17
(0x11)
Organize the items with the specified block content to the specified slot. You should specify the count of items to organize. The output will be the count of items actually moved.
If the new slot already has items, or cannot hold so many items, it will try to move items to the next slot, then the next again.
The block data is considered and will not be ignored.
18
(0x12)
Remove the items in the specified slot. You should specify the count of items to remove. The output will be the count of items actually removed.
19
(0x13)
Remove the items with the specified block content. You should specify the count of items to remove. The output will be the count of items actually removed.
20
(0x14)
Set the block data of the items in the specified slot. You should specify the count of items to set. The output will be the count of items actually set.
If the specified count is less than the count of items in the slot, it will try to move items not set to other available slots.
32
(0x20)
Sort items by count, output the count of used slots.
33
(0x21)
Sort items by count in descending order, output the count of used slots.
34
(0x22)
Sort items by block value, output the count of used slots.
35
(0x23)
Sort items by block value in descending order, output the count of used slots.
48
(0x30)
Try to refresh the crafting result of crafting table or furnace, output the count of the new crafting result.