πŸ“š Basic UsageΒΆ

PrerequisitesΒΆ

InstallationΒΆ

  1. Install LanternLoad in your datapack

  2. Copy the data/itemio folder into your data pack

  3. Merge the contents of ItemIO/data/load/tags/functions/load.json and your own data/load/tags/functions/load.json

Adding your first container !ΒΆ

Add a simple container that only accept dirt in the first slot, but only from bottom :

# example:my_block/place

setblock ~ ~ ~ barrel

execute 
    summon item_display
    run function example:my_block/place_entity:
        # Define the ioconfig
        data modify entity @s item.components."minecraft:custom_data".itemio.ioconfig set value []
        data modify entity @s item.components."minecraft:custom_data".itemio.ioconfig append value {
            Slot:0b,
            mode: "input",
            allowed_side:{bottom:1b},
            filters:[
                {id:["minecraft:dirt"]}
            ]
        }
        tag @s add itemio.container # The required tag
        tag @s add itemio.container.hopper # To make it work with hoppers
        function #itemio:calls/container/init

It’s simple, you just need to define the ioconfig and add the required tags and boom, you have a container that can be used with hoppers.