# MathBot

This page is no longer maintained (deprecated functions, use MCPK-bot instead).

### Conversion

RealDistance(bx,bz) | Real distance of a diagonal jump, accounting for the player's bounding box.
If the jump is not diagonal, set bz = 0. |

RealMomentum(bx,bz) | Real distance of a linear momentum, accounting for the player's bounding box.
If the momentum is not diagonal, set bz = 0. |

Tier(t) | Tier of a jump from its duration in ticks, or vice-versa. |

### Jump Height

Vy(t) | Vertical speed t ticks after jumping. (t >= 1) |

Height(t) | Relative height t ticks after jumping. (t >= 0) |

Duration(h) | Duration of a jump of height h. (h <= max jump height) |

Add * _new* at the end of the function to get 1.9+ values.

### Actions

**v** is the input speed. **Output** is a speed value (in m/t).

Sprint(v) | Apply a sprint tick, assuming the player is on ground |

Sprint_land(v) | Apply a sprint tick, assuming the player just landed from a jump |

Sprint_air(v) | Apply a sprint tick, assuming the player is and was airborne |

Sprint45(v) | Apply a 45° sprint tick, assuming the player is on ground |

Sprint45_land(v) | Apply a 45° sprint tick, assuming the player just landed from a jump |

Sprint45_air(v) | Apply a 45° sprint tick, assuming the player is and was airborne |

Walk(v) | Apply a walk tick, assuming the player is on ground |

... | ... (same syntax) |

Sneak(v) | Apply a sneak tick, assuming the player is on ground |

... | ... (same syntax) |

Stop(v) | No input for one tick, assuming the player is on ground |

Stop_land(v) | No input for one tick, assuming the player just landed from a jump |

Stop_air(v) | No input for one tick, assuming the player is and was airborne |

### Maxed Actions

MAX_SPRINT | Maximum speed from sprinting on ground |

MAX_SPRINT_AIR | Maximum speed from sprinting in air |

MAX_SPRINT45 | Maximum speed from 45° sprinting on ground |

MAX_SPRINT45_AIR | Maximum speed from 45° sprinting in air |

MAX_WALK | Maximum speed from walking on ground |

MAX_WALK_AIR | Maximum speed from walking in air |

MAX_WALK45 | Maximum speed from 45° walking on ground |

MAX_WALK45_AIR | Maximum speed from 45° walking in air |

MAX_SNEAK | Maximum speed from sneaking on ground |

MAX_SNEAK_AIR | Maximum speed from sneaking in air |

MAX_SNEAK45 | Maximum speed from 45° sneaking on ground |

MAX_SNEAK45_AIR | Maximum speed from 45° sneaking in air |

### Jump Speed

**v** is the input speed, **t** is the jump duration. **Output** is a speed value (in m/t).

Jump(v,t,J,M) | Apply a jump of duration t, with initial speed v.
J is the jump bonus, M is the movement multiplier. |

Sprintjump(v,t) | Apply a sprintjump |

Sprintjump45(v,t) | Apply a sprintjump, facing 45° after jumping |

Walkjump(v,t) | Apply a no-sprint jump |

Walkjump45(v,t) | Apply a no-sprint jump, facing 45° |

Strafejump(v,t) | Apply a strafejump (like on rex bwmm) |

Strafejump45(v,t) | Apply a strafejump, facing 45° after jumping |

Add * _del* at the end of the function if the jump is delayed (previous tick was on ground).

### Chained Jump Speed

**v** is the input speed, **t** is the jump duration, **n** is the number of jumps. **Output** is a speed value (in m/t).

Chain(v,t,J,M,n) | Apply n jumps of duration t, with initial speed v.
J is the jump bonus, M is the movement multiplier. |

Chain_Sprintjump(v,t,n) | Apply a sprintjump |

Chain_Sprintjump45(v,t,n) | Apply a sprintjump, facing 45° after jumping |

Chain_Walkjump(v,t,n) | Apply a no-sprint jump |

Chain_Walkjump45(v,t,n) | Apply a no-sprint jump, facing 45° |

Add * _del* at the end of the function if the first jump is delayed (previous tick was on ground).

### Maximum Jump Speed

**t** is the jump duration. **Output** is a speed value (in m/t).

Max_Chain(t,J,M) | Maximum speed from chained jumps.
J is the jump bonus, M is the movement multiplier. |

Max_Sprintjump(t) | Maximum speed from chained sprintjumps |

Max_Sprintjump45(t) | Maximum speed from chained 45° sprintjumps |

Max_Walkjump(t) | Maximum speed from chained walkjumps |

Max_Walkjump45(t) | Maximum speed from chained 45° walkjumps |

### Jump Distance

**v** is the input speed, **t** is the jump duration. **Output** is a distance value (in meters).

Dist(v,t,J,M) | Distance of jump of duration t, with initial speed v.
J is the jump bonus, M is the movement multiplier. |

Dist_Sprintjump(v,t) | Distance of a sprintjump |

Dist_Sprintjump45(v,t) | Distance of a sprintjump, facing 45° after jumping |

Dist_Walkjump(v,t) | Distance of a no-sprint jump |

Dist_Walkjump45(v,t) | Distance of a no-sprint jump, facing 45° |

Dist_Strafejump(v,t) | Distance of a strafejump (like on rex bwmm) |

Dist_Strafejump45(v,t) | Distance of a strafejump, facing 45° after jumping |

Add * _del* at the end of the function if the jump is delayed (previous tick was on ground).

### Speed required to jump a given distance

**d** is the input distance, **t** is the jump duration. **Output** is a speed value (in m/t).

SpeedReq(d,t,J,M) | Required speed for a jump of distance d, and duration t.
J is the jump bonus, M is the movement multiplier. |

SpeedReq_Sprintjump(d,t) | Required speed for a sprintjump |

SpeedReq_Sprintjump45(d,t) | Required speed for a sprintjump, facing 45° after jumping |

SpeedReq_Walkjump(d,t) | Required speed for a no-sprint jump |

SpeedReq_Walkjump45(d,t) | Required speed for a no-sprint jump, facing 45° |

SpeedReq_Strafejump(d,t) | Required speed for a strafejump (like on rex bwmm) |

SpeedReq_Strafejump45(d,t) | Required speed for a strafejump, facing 45° after jumping |

Add * _del* at the end of the function if the jump is delayed (previous tick was on ground).