-
-
Notifications
You must be signed in to change notification settings - Fork 374
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
Support damage entity with damage-causes in MC 1.20.4+ #7044
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.
tests failing
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.
Looks pretty good, just some things here and there. Also, would love to see the description and examples updated.
Maybe I should move |
I don't think so. All the methods that modify the health of a damageable should be left in HealthUtils. |
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.
Just some mild issues with this, outside of missing any addition test for with fake damage cause
so we should look into that as well.
idk how to fix the |
Actually, i don't think the test codes are necessary |
It looks like the creator needs help with fixing the tests for this. If somebody would be willing to assist, that would be good. |
So I've investigated this and solved the test issue: these new experimental methods process more 'natural' damage, which goes through the damage logic, triggering damage mitigation, invincibility frames, etc. I've fixed the test by creating a new entity for the damage source tests, but this might become a problem in future since the behaviour is quite unpredictable. |
* feat: damage entity with damage-causes * style: import * fix: ArrayIndexOutOfBoundsException * perf: resolved pr mentioned * style: Add example * style: sort codes * perf: resolved PR mentioned * style: depart to DamageUtils * style: remove licence * perf: depart to HealthUtils * style: description * style: to JetBrains annotation * perf: resolved PR mentioned * style: Suppress exactly; Add description * perf: Deny using damage cause in old version * perf: resolved PR mentioned * perf: resolved PR mentioned * perf: 更新 EffHealth.java * style: sort code * feat: test codes * perf: test codes * perf: check version * fix: wrong health * fix: test codes * Update src/main/java/ch/njol/skript/bukkitutil/HealthUtils.java * Fix tests (WIP on dev/feature) --------- Co-authored-by: XPYEX <XPYEX0@163.com> Co-authored-by: XPYEX <50171612+0XPYEX0@users.noreply.github.com> Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com> Co-authored-by: Efnilite <35348263+Efnilite@users.noreply.github.com>
Description
As title
Target Minecraft Versions: 1.20.4+
Requirements: none
Related Issues: none