-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
Update ChunkTag
, AreaContainmentObject
and ColorTag
tag param usage.
#2364
Conversation
return null; | ||
} | ||
LocationTag loc = attribute.paramAsType(LocationTag.class); | ||
processor.registerTag(ElementTag.class, LocationTag.class, "contains", (attribute, area, loc) -> { | ||
if (loc == null) { |
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 remove these null
checks, as the new argument handling makes sure the param is present and valid
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.
Oh awesome! I'll push the changes right now :)
New tag processing makes sure the parameter is valid as pointed out by @tal5!
if (mixed_with != null) { | ||
return new ColorTag(object.mixWith(mixed_with)); | ||
tagProcessor.registerTag(ColorTag.class, ColorTag.class, "mix", (attribute, object, mixWith) -> { // Temporarily non-static because the input could be 'random' | ||
if (mixWith != null) { |
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 remove null
check and the error here 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.
Got it! 🙌 Pushing the change now
ChunkTag
and AreaContainmentObject
tag param usage.ChunkTag
, AreaContainmentObject
and ColorTag
tag param usage.
Update
ChunkTag
,AreaContainmentObject
, andColorTag
tag param usage, as per request from issue #2355.Tags updated:
<AreaObject.contains[]>
<AreaObject.blocks_flagged[]>
<AreaObject.is_within[]>
<AreaObject.with_world[]>
<ChunkTag.add[]>
<ChunkTag.sub[]>
<ChunkTag.blocks_flagged[]>
<ColorTag.mix[]>
Now they use the new ✨ fancy ✨ automated attribute processing.
I think I did this right. When I tested it it worked the same so :)
ive never used java before in my life 😳