-
-
Notifications
You must be signed in to change notification settings - Fork 370
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
Add experience point support to ExprTotalExperience #7144
base: dev/feature
Are you sure you want to change the base?
Add experience point support to ExprTotalExperience #7144
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.
and test could include reset or delete
} | ||
|
||
@Override | ||
@Nullable | ||
public Integer convert(Entity entity) { | ||
public Integer convert(Object object) { |
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.
public Integer convert(Object object) { | |
public @Nullable Integer convert(Object object) { |
|
||
// invalid entity type | ||
// invalid type | ||
return null; | ||
} | ||
|
||
@Override | ||
@Nullable | ||
public Class<?>[] acceptChange(ChangeMode mode) { |
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.
public Class<?>[] acceptChange(ChangeMode mode) { | |
public Class<?> @Nullable [] acceptChange(ChangeMode mode) { |
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.
wrong spot
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.
reviewing on mobile moment
return null; | ||
} | ||
return switch (mode) { | ||
case ADD, REMOVE, SET, DELETE, RESET -> new Class[]{Number.class}; |
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.
Can't this be Integer?
Description
This PR adds 'experience point' support to the total experience expression and some tests.
The reason I made this PR is for the "on level progress change:" event. It did not let you get how much experience was changed as a number.
Target Minecraft Versions: any
Requirements: none
Related Issues: none