[SPIGOT-6406] Gravitity-Constant in EntityLiving Created: 03/Apr/21 Updated: 04/Apr/21 |
|
| Status: | Open |
| Project: | Spigot |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Minor |
| Reporter: | FreeSoccerHDX | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 2 |
| Labels: | entity, spigot | ||
| Environment: |
No special Environment / All Environment |
||
| Attachments: |
|
| Version: | All Versions (1.16+) |
| Guidelines Read: | Yes |
| Description |
|
Add a Gravity-Variable in EntityLiving.class (called 'gravity' for example) -> public double gravity = 0.08D; // default value of EntityLiving - Gravity Replace in the Method "public void g(Vec3D vec3d)" of the EntityLiving the variable "double d0 = 0.08D;" to "double d0 = this.gravity ;"
This will allow the possibility to change the gravity of an LivingEntity with a better solution then set Gravity to false and start a 1 tick loop to apply gravity manually. A nice feature would be to auto save it as nbt so even a restart / chunk unload will not lose that gravity data.
Non-EntityLivings like Arrows, Items, Snowballs have custom Gravity values in each of their classes (EntityArrow=0.05000000074505806D, EntityItem=0.04D ....)
|