-
-
Notifications
You must be signed in to change notification settings - Fork 110
Added Dried Ghast Hydration Level #2779
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
tal5
left a comment
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.
Other then this, LGTM!
| // --> | ||
| PropertyParser.registerStaticTag(MaterialLevel.class, ElementTag.class, "minimum_level", (attribute, material) -> { | ||
| return new ElementTag(material.getMin()); | ||
| return new ElementTag(material.getBlockData() instanceof Snow snow ? snow.getMinimumLayers() : 0); |
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 is simple logic, but it's still being repeated here, I'd keep it in a method as this property could definitely support more stuff in the future that have a non-0 min value.
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.
Fixed
| if (level < (getBlockData() instanceof Snow snow ? snow.getMinimumLayers() : 0) || level > getMax()) { | ||
| mechanism.echoError("Level value '" + level + "' is not valid. Must be between " + (getBlockData() instanceof Snow snow ? snow.getMinimumLayers() : 0) + " and " + getMax() + " for material '" + getBlockData().getMaterial().name() + "'."); |
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 needs to use getMin as well I believe?
Requested in https://discord.com/channels/315163488085475337/1417889631269032079
Adds Dried Ghast hydration to the
MaterialTag.levelproperty and related tags