-
Notifications
You must be signed in to change notification settings - Fork 1
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
ArmorStand water move enhancement #3
Comments
Hi @kaxon-dev, |
I found the method you mentioned above (armorstand.isInWater()) in the spigot API. I'm not sure if it is present in all versions, as soon as I have a moment I take a look. for now the idea is to diversify these two checks for what they are, so but i'm sure that i don't need to add paper-api for now. |
Hi @kaxon-dev, So, after a few attempts I believe that it is not the best way to block this type of event,
Yes, you could do the listener by hand, i.e. check all the armorstand 1 to 1 for each x tick, but in my opinion it is bullshit:
I don't know, but in my opinion it seems like bullshit, when you could just block gravity since the generation of the entity. Ah yes, I assume that paper does this thing like that, for each entity, I don't know how it doesn't make it overlap, but in my opinion some slight delay is present with the increase of entities and players. So in summary, I'm sorry but it's not possible at the moment. |
Thanks for the information. Since that solution isn't feasible, how about instead of disabling armor stand gravity altogether, you add a configuration setting for scanning the chunks every X amount of minutes and set their gravity depending on whether or not they're in water? if (entity.getType() == EntityType.ARMOR_STAND) {
entity.setGravity(!entity.isInWater());
} |
Hi, If condition: armorstand is in water and gravity is enabled The only thing now is to figure out if I can add this check to the thread that checks the number of armorstand x chunk/xyz... or do a new thread... Anyway, I'll try to optimize the controls, also if i can, i try to manage everything from 1 single common thread. |
* License Updated * Bump json from 20220924 to 20230227 (#10) * License Updated (#9) * Bump json from 20220924 to 20230227 Bumps [json](https://github.com/douglascrockford/JSON-java) from 20220924 to 20230227. - [Release notes](https://github.com/douglascrockford/JSON-java/releases) - [Changelog](https://github.com/stleary/JSON-java/blob/master/docs/RELEASES.md) - [Commits](https://github.com/douglascrockford/JSON-java/commits) --- updated-dependencies: - dependency-name: org.json:json dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: xSavior_of_God <66216419+xSavior-of-God@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Started development to support Folia WIP * scheduler manager - part#1 * Update pom.xml Fix for Denial of Service in JSON-Java (dependabot) * 1.21.x and Folia Support - Solved #12 - Possible option for #3 - Added Folia Support - Now the piston works if there are armorstands in the same chunk (see new config option) - Limit Check optimization - Added "/asl clear" command - NOW ALL TIMERS ARE IN SECONDS, Min value is 10! * updated CI/CD java version to 22 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
If you're using papermc, you can accomplish preventing armorstands from moving in water quite easily without disabling gravity:
I don't have enough time to make a pull request, but since you're using spigot-api, I'd recommend using reflection to check if the papermc event exists.
The text was updated successfully, but these errors were encountered: