#(LG_Legacy) Brewing recipes matcher support

1 messages · Page 1 of 1 (latest)

manic yew
#

I'm attempting to replicate every vanilla potion in the game to use the same ingredients or potentially custom ingredients down the road, along with making vanilla potions actually be item scripts instead, however I'm running into the problem of altered potions not properly brewing in the stand.

Currently, if you modify the potion ( custom item ) then the brewing event will not finalize and it will just restart itself, if the potion is never altered then things are fine. This is a problem because I have an entire item system that changes the lore and display of the item to show statistics and other fancy stuff to the player, and potentially even a bunch of flags onto them.

https://paste.denizenscript.com/View/116452 - Debug
https://paste.denizenscript.com/View/116453 - Scripts

prisma slateBOT
#

(LG_Legacy) Brewing troubles

prisma slateBOT
#

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.

manic yew
#

(LG_Legacy) Altered custom potions do not properly brew

unreal hound
manic yew
#

Custom brewing recipes work fine, however if you alter the display ( and I assume lore too? Haven't tried lore ) then it'll never properly brew, it'll just reset when it's done and not change the existing potions that need to be converted.

#

I'm not sure if this is "working as intended" or if this is technically a bug, I'm leaning towards bug because the potion is recognized regardless of me editing the display, but it's not finishing the brew.

sleek rampart
#

I may have a suggestion if it's possible... could the display/lore be changed after it's brewed? Either as it's removed or simply in place after the brew finishes?
(I'm also interested in custom brewing lol)
Edit: I generally assume almost anything is possible with Denizen lol

manic yew
#

I can edit these things after it's done brewing yes, but the problem remains that an edited potion that is slightly different from the custom item won't properly brew at all. If a player ( for some reason ) renames it in an anvil, then it's no longer properly functional. If I want to use it in another brewing recipe and I alter it, then it's no longer functional either.

sleek rampart
#

Ohh

#

I see. I shall continue to follow this and I'll pipe up if I have any more ideas lol. (it would probably be needlessly complex but could you temporarily revert it to an unedited form right before the brewing begins?)

manic yew
#

That's possible but it sounds hacky.

sleek rampart
#

That's kinda what I thought too

manic yew
#

I'll wait to see if this is fixable by a developer before resorting to that.

sleek rampart
#

Indeed!

#

I appreciate you having similar designs as me, it will help me greatly when this is resolved lol

unreal hound
#

Oh I understand what you're referring to now - that's not really a bug, just how Minecraft's recipe system works in general.
Inputting an ItemTag is an exact match (I.e. breaks if it's changed in any way); only way to have more custom control currently is to use a material input and do your own checking using events

#

Although Paper did add a predicate recipe choice specifically for brewing recipes recently (as they have an entire separate system internally for whatever reason), so we could theoretically add advanced matching support specifically for brewing recipes - @rare ivy do you think adding a matcher:vanilla_tagged:xyz style thing specifically for brewing recipes would be a good idea? or should we wait until this is available to every recipe type?

rare ivy
#

ehh... some recipe types supporting the ideal system is better than none of em supporting it

lyric gullBOT
#
Changed to Feature

Thread is now a Feature thread. This indicates a request for a new feature to the plugin, that both (A) does not already exist and (B) reasonably can be added. If you are unsure whether this applies, use </helpthread:1028674284870180883> to change back to a normal help thread.

unreal hound
#

(LG_Legacy) Brewing recipes matcher support

manic yew
#

Yes it doesn't finish brewing, but it accepts the fact that the custom item is edited and starts to brew.

#

Or is this a !itworks

#

I was originally going to do my own custom event as well.

#

I'm just not sure how I'm going to be able to complete brewing if the event doesn't fire at all nor does it complete the brewing.

sleek rampart
unreal hound
#

^ might just be a Minecraft thing since it's nether wart or something? what happens if you use something completely unrelated?

manic yew
#

In what regards? You want me to see if it'll start brewing regardless of ingredient?

#

Oh you're right.

#

Adding glowstone to my custom item starts brewing, but never finishes.

#

By adding glowstone I meant the brewing stand, I didn't change the recipe at all.

#

It's not a client issue either because the brewing starts event is firing.

unreal hound
#

Yeah that's probably a Minecraft/Paper thing then (but can remove Denizen and test again if you want to be certain)

manic yew
#

If I remove denizen then the custom potion recipe will no longer exist.

#

Editing a vanilla potion with a custom name seems to brew just fine, however I could check without denizen you're correct.

#

Even without denizen, vanilla potions with edited display brew just fine it seems, if anything it seems to just replace it with the potion it's meant to. A water potion brews into an a thick potion with glowstone dust.

manic yew
#

So I guess I'll just have to do some inventory events and do what Haleon suggests, revert the potion itself back to it's item script form when I put them in or something.

#

Either that or I'm just going to have to make a custom gui that replicates brewing and do my own logic.

unreal hound
#

As you could use an ItemTag matcher as usual for the item script

manic yew
#

Uhm.

#

Pardon me for being ignorant, but how will this help me if the edited potions never finish brewing and the event never fires?

unreal hound
#

The Denizen recipe shouldn't matter of this, it's an exact item match, I.e. the item being modified means the Denizen recipe should never come into play here

#

The behavior your seeing is likely either a vanilla recipe using a material matcher/some hard-coded thing for nether warts; if advanced matchers were added you could make the Denizen recipe work properly for modified items as well, which means it shouldn't run into this weird behavior

manic yew
#

Oh wait this is a thing for the recipes thats going to be changed, not the event?

unreal hound
#

I.e. even if the item is renamed, it would recognize it's meant to be using your custom recipe and not try doing whatever it's trying to do there

#

Yeah, currently recipes can have an ItemTag for an exact match, or material:<material> for a material match - the thing that could be added specifically for brewing recipes is matcher:<matcher> for advanced matcher support in recipes

manic yew
#

That would be cool.

#

I get it now.

#

Curious though, what if I just... remove the vanilla recipe from the server?

#

https://paste.denizenscript.com/View/116502 Actually scratch that, I can't get the recipe id from an awkward potion anyways, there may be a better method of doing this. There exists a mech for removing recipes from a listtag but since I can't actually pull them then this is an issue.

#

Mostly because it says only custom ones are available.

#

I'll wait for the matcher for brewing recipes.

unreal hound
#

Added ref #commit-log message / #changelog message

lyric gullBOT
#
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.)

#

@manic yew

manic yew
#

Big thanks.