-
-
Notifications
You must be signed in to change notification settings - Fork 400
EntityData Overhaul #7985
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
Open
Absolutionism
wants to merge
26
commits into
SkriptLang:dev/feature
Choose a base branch
from
Absolutionism:dev/EntityDataMultiLinedPatterns
base: dev/feature
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
EntityData Overhaul #7985
Absolutionism
wants to merge
26
commits into
SkriptLang:dev/feature
from
Absolutionism:dev/EntityDataMultiLinedPatterns
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…taMultiLinedPatterns # Conflicts: # src/main/resources/lang/default.lang
…taMultiLinedPatterns # Conflicts: # src/main/java/ch/njol/skript/entity/BeeData.java # src/main/java/ch/njol/skript/entity/BoatChestData.java # src/main/java/ch/njol/skript/entity/BoatData.java # src/main/java/ch/njol/skript/entity/DroppedItemData.java # src/main/java/ch/njol/skript/entity/EntityData.java # src/main/java/ch/njol/skript/entity/LlamaData.java # src/main/java/ch/njol/skript/entity/ParrotData.java # src/main/java/ch/njol/skript/entity/PigData.java # src/main/java/ch/njol/skript/entity/SheepData.java # src/main/java/ch/njol/skript/entity/ThrownPotionData.java # src/main/java/ch/njol/skript/entity/TropicalFishData.java # src/main/resources/lang/default.lang
Reviews are still welcome while in draft |
…taMultiLinedPatterns # Conflicts: # .github/CODEOWNERS # src/main/java/ch/njol/skript/lang/SkriptParser.java
Marking as ready for review. |
Efnilite
requested changes
Jul 4, 2025
Efnilite
requested changes
Jul 4, 2025
sovdeeth
requested changes
Jul 6, 2025
Move EntityPatterns into Patterns Add getMatchedPattern to Patterns Add kleeneanMatch to EntityData add dataMatch to EntityData
…taMultiLinedPatterns # Conflicts: # src/main/java/ch/njol/skript/entity/PigData.java
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
breaking changes
Pull or feature requests that contain breaking changes (API, syntax, etc.)
enhancement
Feature request, an issue about something that could be improved, or a PR improving something.
needs reviews
A PR that needs additional reviews
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
default.lang
file became increasingly hard to readmatchedPattern
for abstractEntityData#init(...)
is actuallymatchedCodeName
EntityData#matchedPattern
which is used forEntityData#toString
EntityData#matchedPattern
gives the wrong impression of what exactly it is used forSolution
EntityDataInfo
for custom handling of multi lined patterns in thedefault.lang
for code names.EntityData#init(...)
now passes thematchedCodeName
(which is the same behavior as the previousmatchedPattern
)matchedPattern
has been refactored to pass along the actual matched pattern correlating to patterns of each code nameEntityData#matchedPattern
has been renamed tocodeNameIndex
to be more specific and match these new changesdefault.lang
utilize the multi linedpatterns
section for improved readabilitynull
values for general purposes rather than a specific typematchedPattern
in their#init
usematchedCodeName
nowmatchedCodeName
andmatchedPattern
Patterns<T>
for code names forEntityData#register
T
data field usingEntityPatterns#getInfo
within#init
usingmatchedCodeName
matchedCodeName
fromT
object usingPatterns#getMatchedPattern
EntityData#codeNameIndex
within#init(Class, Entity)
and constructors with parameters#deserialized
getSuperType
now correctly get a data object with no special dataSimpleEntityData#info
->simpleInfo
to remove any confusion ofEntityData#info
super.info
forEntityData#info
Misc Changes
OcelotData
as no supported versions of Minecraft still hadOcelot
asTameable
thus not needing any special data and being moved toSimpleEntityData
entities
section indefault.lang
to have the nodes be categorized by whichEntityData
class handles itCondIsSpawnable
to be able to check if anEntityData
can be spawned#canSpawn
inDisplayData
ensuring it wasn'tDisplayType.ANY
EntityData
classes use as fields and constructor parameters allowing to be stored in global variablesMisc Fixes
fox (kid|child[plural:ren])
for bothred fox
andsnow fox
but didn't have the leadingred
orsnow
, same was seen forMooshroom
sTesting Completed
built-in tests
EntityData.sk
Supporting Information
N/A
Completes: none
Related: none