Conversation
…to dev/feature
…to dev/feature
…to dev/feature
…to dev/feature
…to dev/feature
…to dev/feature
…to dev/feature
…to dev/feature
…to dev/feature
…to dev/feature
…to dev/feature
src/main/java/org/skriptlang/skript/bukkit/entity/allay/EffAllayDuplicate.java
Outdated
Show resolved
Hide resolved
src/main/java/org/skriptlang/skript/bukkit/entity/general/conditions/CondEntityIsInLiquid.java
Outdated
Show resolved
Hide resolved
src/main/java/org/skriptlang/skript/bukkit/entity/general/conditions/CondEntityUnload.java
Outdated
Show resolved
Hide resolved
src/main/java/org/skriptlang/skript/bukkit/entity/EntityDataInfo.java
Outdated
Show resolved
Hide resolved
src/main/java/org/skriptlang/skript/bukkit/entity/general/conditions/CondItemInHand.java
Outdated
Show resolved
Hide resolved
src/main/java/org/skriptlang/skript/bukkit/entity/EntityDataInfo.java
Outdated
Show resolved
Hide resolved
APickledWalrus
left a comment
There was a problem hiding this comment.
Great work so far! I would register EntityData's in the init of a module rather than load.
I think some of these changes raise important questions too. Should it be explicitly required that entity data patterns have to be defined in default.lang? What benefit does that provide? It might be worth us considering the other direction. This is a good opportunity for us to make more drastic changes (if deemed good).
I raise some more significant syntax changes as well (some minor pattern changes, deprecations, etc.). I believe that all syntax in the new package should reflect best practices. We should be able to point to the new packages and say "any syntax here is an example of the best practices".
Also, for general syntax, I would put it under entity.elements rather than entity.general.
I would also consider general things for syntax cleanup:
- Can examples be improved? An example that just states that syntax isn't really good.
- Ensure property conditions override getPropertyType as necessary
- Ensure patterns are optimized:
(a|b|) -> [a|b],([a|b]) -> [a|b] - Boolean expression should be deprecated in favor of conditions + effects
- Lots of integer expressions are missing proper overflow handling. Consider methods like
Math2.addClamped. That is, if I do something likeadd 10 seconds to X of Y, I want it to cap at the max number value, not overflow back to minimum.
| assert entityClass == other.entityClass; | ||
| return true; | ||
| } | ||
| public static Serializer<org.skriptlang.skript.bukkit.entity.EntityData> serializer = org.skriptlang.skript.bukkit.entity.EntityData.serializer; |
There was a problem hiding this comment.
This is not the same thing
src/main/java/org/skriptlang/skript/bukkit/entity/EntityData.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
It seems like there are still some public methods that were outright removed. Double check to make sure all public methods have compatibility functionality.
src/main/java/org/skriptlang/skript/bukkit/entity/EntityType.java
Outdated
Show resolved
Hide resolved
| import ch.njol.skript.util.Utils; | ||
| import ch.njol.yggdrasil.YggdrasilSerializable; | ||
|
|
||
| public class EntityType |
| StriderData.register(); | ||
|
|
||
| SyntaxRegistry registry = addon.syntaxRegistry(); | ||
| EffStriderShivering.register(registry); |
There was a problem hiding this comment.
CondStriderIsShivering needs converted too
Problem
SyntaxElement classes using deprecated registration methods
EntityDataInfo extended deprecated SyntaxElementInfo
Classes were not in org
Solution
Migrate all EntityData classes to 'entity' package and made modules for those who have SyntaxElements that only work for one entity.
Migrate all SyntaxElements that include entity or living entity as being the main and only property (of %%) into a general package inside 'entity'. Additionally updated to new registration methods and current code conventions.
Updated EntityDataInfo to implement SyntaxInfo, with corresponding behavior.
Testing Completed
Existing test files + test actions
Supporting Information
Breaking Changes
Note
As mentioned I only migrated SyntaxElements where the main/only property was entity or living entity.
Any syntax that shared the spotlight was not migrated, as well as ERS syntaxes.
Let me know if I missed any or any that I should bring over.
Completes: none
Related: none
AI assistance: SovdeBot 100%