-
-
Notifications
You must be signed in to change notification settings - Fork 369
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
base: dev/feature
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.
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.
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.
nice
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 awaiting test, but for now I can approve. If you're unsure how to make test let someone know and we can help explain it.
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.
needs some tests but looks good
What should I do for test?😂I don know it actually |
you should spawn an entity and assert that a bunch of normal and edge cases work as you expect. you can check out examples |
wait 1 tick | ||
damage {_m} by 2 hearts with damage cause fall | ||
assert health of {_m} is 3 with "damage cow failed" |
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.
You can't wait in tests. Also, this will throw an error on MC servers running an older version than 1.20.4.
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.
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.
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.
You cannot wait, because anything after the wait will run after the test runner is finished, essentially making it useless.
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.
You cannot wait, because anything after the wait will run after the test runner is finished, essentially making it useless.
Yes, so I removed it. But idk how to fix the mark
problem, bcs the damage is delayed
idk how to fix the |
Actually, i don't think the test codes are necessary |
Description
As title
Target Minecraft Versions: 1.20.4+
Requirements: none
Related Issues: none