Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-6406

Gravitity-Constant in EntityLiving

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • No special Environment / All Environment

    • All Versions (1.16+)
    • Yes

      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 ....)

       

            Unassigned Unassigned
            FreeSoccerHDX FreeSoccerHDX
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: