Custom items - AmthystXx/Geode GitHub Wiki
In Geode, you can create custom items with a. It may be useful to create custom items based on spawn eggs (since they do nothing, and there are LOTS of them), so I've provided the ability to make working custom items with or without spawn eggs.
Example recipe for item based on spawn egg:
{
"type": "minecraft:crafting_shapeless",
"ingredients": [
{
"item": "minecraft:barrier"
}
],
"result": {
"id": "[Spawn egg]",
"count": 1,
"components": {
"minecraft:item_name": "{\"text\":\"[Custom item name]\"}",
"minecraft:can_break": {"geode":"custom_item"},
"minecraft:entity_data": {
"id": "minecraft:marker",
"Tags": ["geode.dispensed_item"],
"data": {"item_id":"[The path (namespace:path/loot_table) to the loot table that your item is in]"}
}
}
}
}
Example loot table for custom item based on spawn egg
{
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:[Spawn egg]",
"functions": [
{
"function": "minecraft:set_components",
"components": {
"minecraft:item_name": "{\"text\":\"[Custom item name\"}",
"minecraft:can_break": {"geode":"custom_item"},
"minecraft:entity_data": {
"id": "minecraft:marker",
"Tags": ["geode.dispensed_item"],
"data": {"id":"[The path (namespace:path/loot_table) to the loot table that your item is in]"}
}
}
}
]
}
]
}
]
}
Example recipe for non-spawn egg custom item
{
"type": "minecraft:crafting_shapeless",
"ingredients": [
{
"item": "minecraft:barrier"
}
],
"result": {
"id": "[Item your custom item is based on]",
"count": 1,
"components": {
"minecraft:item_name": "{\"text\":\"[Custom item name]\"}",
"minecraft:can_break": {"geode":"custom_item"}
}
}
}
You do NOT need a loot table for items that aren't based on spawn eggs.