Tables
Create your own crafting table using LPS Rcore API.
Tables are stored in rcore:register tables
.
Create Table
- Create a MCFUNCTION file in your datapack called tables.mcfunction. This file can be located anywhere in your datapack.
- Now using the NBT Schema and examples from below you can add all your tables to the created tables.mcfunction.
- You now need to create a function tag located
data/rcore/tags/functions/register_tables.json
and enter the path to your tables function. - Now in-game run
/reload
to reload your datapack. Then run/function rcore:reload
to reload all tables.
Obtaining
To obtain your table using commands use the following commands in a MCFUNCTION file. Make sure to replace "example:my_table" with the ID of your table.
mcfunction
data modify storage rcore:api find set value "example:my_table"
function rcore:crafting_table/drop
Table Schema
Name | Type | Description |
---|---|---|
id | String | ID of this table |
tags | Array[String] | List of recipe tags that this table uses. |
table_name | TextComponent | The name displayed in the GUI. default is "Crafting" |
nbt | Object | NBT data for the block. This is where you place the CustomModelData and display.Name data. |
custom | Object | Custom NBT data that should get copied over to the crafting table block |
conditions | NOT IMPLEMENTED - Array of conditions that must pass for recipes to work. | |
grid | Boolean | EXPERIMENTAL - A grid on the top of the block that lets you craft items without having to open the GUI. |