-
-
Notifications
You must be signed in to change notification settings - Fork 112
CreakingHeartState tag and mechanism #2783
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: dev
Are you sure you want to change the base?
Conversation
| // --> | ||
| tagProcessor.registerTag(ElementTag.class, "heart_state", (attribute, object) -> { | ||
| if (!(object.getBlockState().getBlockData() instanceof CreakingHeart heart)) { | ||
| Debug.echoError("The 'LocationTag.heart_state' tag can only be called on a creaking heart block."); |
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.
Attribute#echoError
| Debug.echoError("The 'LocationTag.heart_state' tag can only be called on a creaking heart block."); | ||
| return null; | ||
| } | ||
| return Utilities.enumlikeToElement(heart.getCreakingHeartState()); |
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 probably just be new ElementTag(state)? These methods do some extra stuff for legacy/cross-version compatibility, but aren't really needed for normal enum usage.
| }); | ||
|
|
||
| // <--[mechanism] | ||
| // @object LocationTag |
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.
This seems to be operating on just the BlockData, is there any reason it's on LocationTag and not a MaterialTag property (maybe in MaterialTag.mode)?
Adds in the
heart_statetag and mechanism to control a creaking heart's state.Requested in https://discord.com/channels/315163488085475337/1429656035865530380