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 Configuration for vertical Despawn Ranges #10440
base: master
Are you sure you want to change the base?
Add Configuration for vertical Despawn Ranges #10440
Conversation
I'm not sold on the format for the config with this change. There are several options that I can think of that I'd prefer despawn-ranges:
monster:
hard:
xz: 30 # or "horizontal"
y: 5 # or "vertical"
soft: 20 # just putting a numerical value would mean it applies to both (as it does now) or despawn-ranges:
monster:
hard: 30
soft: 20
soft-y: 5 # basically the `-y` value wouldn't even be in the config if it wasn't being used |
is there an existing way i can add optional configurations like that? |
As you already said, this does not currently "work", as the distanceSqrt still takes into account the y diff. This would also heavily improve the variable names, making this whole mess a lot easier to read. |
alright i will probably be working on the custom serializer and the rewrite tomorrow |
d6f0c44
to
386f521
Compare
Implemented the requested changes |
862c67c
to
679ed07
Compare
fba9cdc
to
036ccbd
Compare
036ccbd
to
272c867
Compare
resolves #10177
config naming/structure might need some changes, i didn't wanna break existing configs so i just did it like this.
currently doesn't work for Raiders as those have extra checking logic in the removeWhenFarAway method, so i am not quite sure what to do about those
EDIT: also wanted to add that i am not sure if the normal despawn range should still impact the y axis. since your x axis is going to be higher then your y axis 99 % of the time anyways i will just have it keep affecting that aswell