#(thatkev) Custom item crafting recipe

37 messages · Page 1 of 1 (latest)

weary vine
#

I'd like some guidance as to how I'd create a custom crafting recipe using a custom item (different model data)
NBT attached

wet shoalBOT
#

(thatkev) Custom item crafting recipe

wet shoalBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

weary vine
#

Please @mention

cobalt gale
#

For crafting the item, ideally this is something the other plugin would have, but if not you'd have to replicate the item in an item script

weary vine
#

crafting custom items to create custom items

#

Unless ItemsAdder does this

#

i might check

#

it does but not without names and stuff

cobalt gale
#

To use the item in a recipe, sadly Minecraft doesn't really have any dynamic recipe matching support - you'd probably have to make a recipe that uses the item's material, and then check that it's your custom item in a

#

!e item recipe formed

proven stormBOT
# cobalt gale !e item recipe formed
Group

Item

Event Lines

<item> recipe formed

Triggers

when an item's recipe is correctly formed.

Has Player

Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.

Context

<context.inventory> returns the InventoryTag of the crafting inventory.
<context.item> returns the ItemTag to be formed in the result slot.
<context.recipe> returns a ListTag of ItemTags in the recipe.
<context.recipe_id> returns the ID of the recipe that was formed.
<context.is_repair> returns an ElementTag(Boolean) of whether the event was triggered by a tool re...

Determine

ItemTag to change the item that is formed in the result slot.

Cancellable

True - this adds <context.cancelled> and determines cancelled + cancelled:false.

weary vine
#

the item is a diamond (crystal), looking to craft a key with it (also a diamond)

#

9 crystals = key

#

so diamond block recipe?

cobalt gale
#

Though if you're trying to make a whole custom items crafting each other system with Denizen for crafting, it might be easier for you to use Denizen item scripts

weary vine
#

yeah, this is what I have so far

dungeon_key_craft:
    type: item
    material: diamond
    display name: <green><bold>Dungeon<reset> Key
    mechanisms:
        custom_model_data: 11007
    recipes:
        1:
            type: shaped
            input:
                - crystal|crystal|crystal
                - crystal|crystal|crystal
                - crystal|crystal|crystal

crystal:
    type: item
    material: diamond
    display name: <green><bold>Dungeon<reset> Crystal
    mechanisms:
        custom_model_data: 11006```
#

just doesn't work as it doesn't have the itemsadder custom data

cobalt gale
#

Yeah that's what I was saying - there's no direct integration between Denizen and ItemsAdder, so you would need to either completely recreate the ItemsAdder item in Denizen to use it (I.e. include the custom data so that it's the exact same item), use Denizen item scripts for the custom item instead, or maybe just ItemsAdder if it has custom crafting recipes

weary vine
#

I'll be okay with completely recreating the item

cobalt gale
#

Then

#

!m custom_data

proven stormBOT
# cobalt gale !m custom_data

(Property) Sets an item's custom NBT data, if any.
The map is in NBT format, see !language Raw NBT Encoding.
This does not include any normal vanilla data (enchantments, lore, etc.), just extra custom data.
This is useful for integrating with items from external systems (such as custom items from plugins), but item flags should be preferred otherwise.
Provide no input to clear custom data.

Group

Properties

Object

ItemTag

Input

MapTag

Tags

<ItemTag.custom_data> (Property) Returns an item's custom NBT data, if any. The map is in NBT form...

weary vine
#

yeah,

#
custom_data:
  itemsadder:
    namespace:string:gemstonebit
    id:string:tsavorite
cobalt gale
#

You'd need to specify the same map the ItemsAdder item has in your item script

weary vine
cobalt gale
#

Not 100% sure offhand but don't think so - you need a space between the key and value though

weary vine
#

yeah i'll give it a go now

#

won't be long

cobalt gale
#

I have to go for a bit, will be back later though (or another helper ofc)

pseudo duneBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.

If not yet resolved, please reply below to tell us what you still need.

(Note that if there is no reply for a few days, this thread will eventually close itself.)

#

@weary vine