-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Add mob spawner ranges changes and API #9102
base: master
Are you sure you want to change the base?
Add mob spawner ranges changes and API #9102
Conversation
patches/server/0977-Add-mob-spawner-ranges-changes-and-API.patch
Outdated
Show resolved
Hide resolved
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.
Thanks for the contribution!
Just have a couple minor suggestions.
patches/server/0977-Add-mob-spawner-ranges-changes-and-API.patch
Outdated
Show resolved
Hide resolved
patches/server/0977-Add-mob-spawner-ranges-changes-and-API.patch
Outdated
Show resolved
Hide resolved
I agree with these, but how do I make those changes and add them to this PR? I'm new to this whole thing... |
So what you want to do is edit the patches by ammending to the commits you created in |
I've added them - hopefully I did it correctly 😁 |
@Machine-Maker do I need to do something now or am I just waiting for this to be approved? |
patches/server/0977-Add-mob-spawner-ranges-changes-and-API.patch
Outdated
Show resolved
Hide resolved
patches/server/0977-Add-mob-spawner-ranges-changes-and-API.patch
Outdated
Show resolved
Hide resolved
@Machine-Maker everything changed, anything else needs to be done before this can be merged? |
9d81ca5
to
8e97256
Compare
} | ||
+ | ||
+ // Paper start | ||
+ if (nbt.contains(SPAWN_RANGE_VERTICAL_TAG, 99)) { |
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.
You can use the Tag.TAG_ANY_NUMERIC constant
import java.util.Optional; | ||
import java.util.function.Function; | ||
import javax.annotation.Nullable; | ||
+ |
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 newline is not needed
+ | ||
+ /** | ||
+ * Set the new vertical spawn range. | ||
+ * <br> |
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 newline is not needed
+ public DefaultMobSpawnerValues defaultMobSpawnerValues; | ||
+ | ||
+ public class DefaultMobSpawnerValues extends ConfigurationPart { | ||
+ public Range range; | ||
+ | ||
+ public class Range extends ConfigurationPart { | ||
+ public int horizontal = 4; | ||
+ public int vertical = 1; | ||
+ } | ||
+ } | ||
+ |
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 should be in the config patch (0005-Paper-config-files.patch)
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.
I'm not sold on the usefulness or virtue of having the global defaults. They won't apply retroactively to any already-generated spawners because the NBT is already set to 4. I think adding a default for the height is better, but they are already controllable via a plugin.
paper-global.yml
)