-
-
Notifications
You must be signed in to change notification settings - Fork 368
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 Attributes #2664
Base Attributes #2664
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.
The reason we have asked for a type is to be able to use the different enum constants as english phrases. Having an expression which uses a string is pretty much the same thing.
Look at how the Cat.Type or similar classes handle this behaviour.
Ohhh sorry... Now I see what you mean... These few commits should fix that. |
By the way, is it alright for me to define all the attributes present in 1.14 in |
Yes, they're just ignored in older versions. |
src/main/java/ch/njol/skript/expressions/ExprEntityAttribute.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/expressions/ExprEntityAttribute.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/expressions/ExprEntityAttribute.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/expressions/ExprEntityAttribute.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/expressions/ExprEntityAttribute.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/expressions/ExprEntityAttribute.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/expressions/ExprEntityAttribute.java
Outdated
Show resolved
Hide resolved
Added a documentation notice that the movement speed attribute cannot be reliably used for players, and for that purpose, users should use the speed expression instead. |
Could this be automatically tested, or does it require player interaction? |
@bensku We could probably do something like setting an entity's attribute, waiting a tick, and then comparing if it's the same as before. |
Even waiting a tick should not be necessary. Besides, delays are currently not supported in tests. |
src/main/java/ch/njol/skript/expressions/ExprEntityAttribute.java
Outdated
Show resolved
Hide resolved
Is this ready for merge? |
Should be alright to merge. I can do a future PR to add more functionality onto this expression. |
Changes were made
Description
This PR is an improvement of #2656 that adds a new
attributetype
type and%entities%'s %attributetype% value
expression, that allows for the direct modification of entities' attributes, such asattack speed attribute
,max health attribute
, etc. while also allowing for storage ofattributetypes
in variables.Please help me review :)
Target Minecraft Versions: Any
Requirements: None
Related Issues: None