Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SUGGESTION] Recipe input item match from only NBT in custom_data tag #704

Closed
Fiopon opened this issue Aug 17, 2024 · 2 comments
Closed
Labels
wontfix ⛔️ This will not be worked on

Comments

@Fiopon
Copy link

Fiopon commented Aug 17, 2024

Suggestion

Recipes to have a less restricted item with nbt input.
As it stands, if I have a custom item, and someone renames the item, it cannot be used in recipes where I specify the custom item as an ingredient.

Example:
on load: set {_customItem} to diamond with nbt from "{""minecraft:custom_data"":{custom_item_id:""ruby""}}" register new shapeless recipe for 1 of diamond using {_customItem}, {_customItem} and light blue dye with id "diamond_from_rubies"

If a player, for whatever reason, renames their ruby item, it will no longer work as an ingredient in the recipe

My suggestion is to create "loose" matching items.
set {_customItem} to loose match of diamond with nbt from "{""minecraft:custom_data"":{custom_item_id:""ruby""}}"
This would only check if the item is a diamond, and if it has at LEAST the nbt tags specified. Any additional tags the item has would be ignored

Alternatives

I really cannot think of any other alternatives, other than maybe only checking for the basic "diamond" item and then looping the inputs, locking the output if the diamonds dont have the ruby tag, but that seems not so straightforward

Additional Information

No response

@Fusezion
Copy link
Collaborator

Fusezion commented Aug 17, 2024

Alright now that I've wasted 3 hours since coming home I can reply properly for this message.

We have no control over what does and doesn't work for recipes, we're relying on the bukkit api to provide us methods sadly this means we only get MaterialChoice matches items based on material and ExactChoice requires all item meta to be an exact copy of each other.

Trust me when I say I myself more than probably anyone want to see more expansions on recipe apis luckily it seems paper is still working on the PredicateChoice which originally was for potion mix but for recipes which will enable this granted nothing has been said for about 5 months PaperMC/Paper#9996 hopes and prayers 🙏

@Fusezion
Copy link
Collaborator

Fusezion commented Aug 18, 2024

Have updated my original messages with a bit more detail however due to current api limitations I've deemed this as not planned/wont fix

@Fusezion Fusezion closed this as not planned Won't fix, can't repro, duplicate, stale Aug 18, 2024
@Fusezion Fusezion added the wontfix ⛔️ This will not be worked on label Aug 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix ⛔️ This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants