1.8.8 How does jump boost impact a players jump?

Discussion in 'Spigot Plugin Development' started by CodingCyClone, Oct 12, 2021.

  1. I am trying to figure out how to make this predicted value take into account the player having jump boost. I have been searching through the 1.8.8 Minecraft code but I have not been able to find anything yet. Right now I am doing this but it does not give an accurate value when the player jumps into the air with any level of jump boost let me know if you have any ideas how to accurately predict their height. (I am comparing distY to predictedDistance)
    Code (Text):
    double GRAVITY_FRICTION = 0.9800000190734863D;
    public double distY, deltaY;
    public double lastDistY, predictedDistanceY;

             // Processes Y movement dat
            distY = to.getY() - from.getY();
            double lastDistY = this.lastDistY;
            this.lastDistY = distY;

            // Processes predicted distance
            predictedDistanceY = (lastDistY - 0.08D) * GRAVITY_FRICTION;
  2. Every level of jump boost, is increasing the jump height by 0.5 blocks
  3. Alright would you have any suggestions for making it predict the right height when when a player has jump boost? Its not a constant discrepancy so I cant just simply subtract that number from the outcome. For example the numbers are typically between 0.013 and 0.208 off with jump boost 1 and typically these issues occur at the apex of a players jump. Any idea how I could compensate for players having jump boost in the equation above?
  4. If you want to predict it you would have to try several values and calculate at your "// Processes predicted distance" until it has an approximate exact value like the lastY