-
-
Notifications
You must be signed in to change notification settings - Fork 414
Fixed so that delays on a blind path doesn't affect other paths #8251
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
base: master
Are you sure you want to change the base?
Conversation
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.
this should be fixed by only setting the delay before of the if branch
|
The teleport effect is working fine, do not remove its setting of the delay. The issue is in the prolongation of delays through the parsing of the if. The parser should be smart enough to realize that the delayed path stops and only non-delayed paths reach the set damage effect. |
|
|
||
| if (async) | ||
| getParser().setHasDelayBefore(Kleenean.UNKNOWN); // UNKNOWN because it isn't async if the chunk is already loaded. | ||
|
|
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.
| if (getParser().getCurrentSection(TriggerSection.class) instanceof Section currentSection | ||
| && currentSection.getNode() instanceof SectionNode currentNode) { | ||
|
|
||
| // set hasDelay to false if the only delayed section is the current one |
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.
Is this safe in the following scenario? I don't think it is
loop 3 times:
wait 1 tick # the loop is delayed
exit loop # only this section is delayed, so we set delayed before to false
set damage to 2 # setting damage after event has passed

Problem
Teleport effect is causing set damage not to work as expected as described in #8203
Solution
Removed teleport effect setting hasDelayBefore to Unkown.
Testing Completed
Tested on version 1.21.10
Supporting Information
Completes: #8203
Related: none