-
-
Notifications
You must be signed in to change notification settings - Fork 386
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
Fix event-itemstack for ComplexRecipe #7674
base: dev/patch
Are you sure you want to change the base?
Fix event-itemstack for ComplexRecipe #7674
Conversation
In my opinion, this fix is unreliable, and not what the user would want. Though, there is an existing recipe PR, which might include this |
It does not |
Sadly due to restrictions there really isn't any other fix, the only thing I could think of is implementing it as a future event-value to retain existing behavior, but since the method name is current it doesn't make sense for it to be future |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as long as the previous way for checking the result item (that isnt air) still works, lgtm
perhaps tests? :D |
Right, I've run the test tasks and wrote a simple script that shows what items are crafted, but I'll try to see if some more advanced scripts (updated to work with the patch) still hold up. |
I would argue that the users probably would want the item to make sense, and not simply be a bogus "air" for some recipes. |
recipes will be exposed when the recipe pr is merged, a custom event would be discouraged by me since it's an extra step for no benefit. Only concern I have is possible breaking behavior in skripts, but the only two solutions would be a) register a future event-value, which doesn't make sense as it's present So I'm fine with just adding it on top of the existing event-value |
Oh, my bad I am not super familiar with Skript, I wasn't aware of the time states system. If what I just said turns out true, and we do go for completely removing the bug, wouldn't it make more sense to broaden the patch for all crafting recipes, after making sure, of course, that everything works fine that way too? |
Description
With CraftEvent, the item stack is obtained through looking at the recipe's result. However, in the majority of cases, when the recipe is a ComplexRecipe, this result is air.
This PR adds a check to instead use the currentItem method in such cases, which solves the issue without altering the behaviour with 'normal' crafts.
This would potentially be an issue, as scripts relying on this bug would stop working.
However, it would eliminate some confusion, and allow to tell the items in question apart (as far as I know, there was no way to previously do so in such cases).
Target Minecraft Versions: any
Requirements: none
Related Issues: #5762