Calculators - anon-noob/mothball GitHub Wiki

Calculators

These functions do things more than just calculating minecraft movement, they actually do math and are probably the most powerful functions Mothball has to offer.

Repeat

# Other Aliases: rep, r
repeat(
  sequence: str = "",
  count: int = 1
)

Executes sequence count times. For example, r(sj(2) outz,3) is equivalent to sj(2) outz sj(2) outz sj(2) outz

Limitations

Because this is a discord bot, println or print cannot be used inside the repeat function no more than 3 times.

Z_bwmm

# Other Aliases: zbwmm, bwmm
z_bwmm(
  mm: float = 1.0,
  strat: str = "sj45(12)"
)

Performs strat with an initial speed such that mm blocks of momentum is covered while performing it.

If the strat runs into inertia while being performed with the optimal speed, then the distance will be incorrect.

Outputs the speed required and the resulting distance.

By default, it assumes the player starts on the ground. Prefix it with stopair to indicate starting while midair, or stopwater to indicate starting in water. For example, sta bwmm(2, sj(12))

X_bwmm

# Other Aliases: xbwmm
x_bwmm(
  mm: float = 1.0,
  strat: str = "sj45(12)"
)

The X axis version of z_bwmm.

xz_bwmm

# Other Aliases: xzbwmm
xz_bwmm(
  xmm: float = 1.0,
  zmm: float = 1.0,
  strat: str = "sj45(12)"
)

The 2-axis version of the bwmm functions.

Z_inv

# Other Aliases: zinv, inv
z_inv(
  dist: float = 1.6,
  strat: str = "sj45(12)"
)

Performs strat with an initial speed such that the player's resulting displacement is dist.

If the strat runs into inertia while being performed with the optimal speed, then the distance will be incorrect.

Outputs the speed required and the resulting distance.

By default, it assumes the player starts on the ground. Prefix it with stopair to indicate starting while midair, or stopwater to indicate starting in water. For example, stwt inv(2, sj(12))

X_inv

# Other Aliases: xinv
z_inv(
  dist: float = 1.6,
  strat: str = "sj45(12)"
)

The X axis version of z_inv.

xz_inv

# Other Aliases: xzinv
xz_inv(
  x: float = 1.6,
  z: float = 1.6,
  strat: str = "sj45(12)"
)

The 2-axis version of the inv functions.

Z_speedreq

# Other Aliases: zspeedreq, speedreq
z_speedreq(
  blocks: float = 5.0,
  strat: str = "sj45(12)"
)

Performs strat with an initial speed such that the player travels blocks blocks.

If the strat runs into inertia while being performed with the optimal speed, then the distance will be incorrect.

Outputs the speed required and the resulting distance.

By default, it assumes the player starts on the ground. Prefix it with stopair to indicate starting while midair, or stopwater to indicate starting in water. For example, sta speedreq(4, sj45(9))

X_speedreq

# Other Aliases: xspeedreq
x_speedreq(
  dist: float = 5.0,
  strat: str = "sj45(12)"
)

The X axis version of z_speedreq.

xz_speedreq

# Other Aliases: xzspeedreq
xz_speedreq(
  xb: float = 3.0,
  zb: float = 4.0,
  strat: str = "sj45(12)"
)

The 2-axis version of the speedreq functions.

[Add height and blip and ji here]

Possibilities

# Other Aliases: zposs, poss
possibilities(
  sequence: str = "sj45(100)"
  mindistance: float = 0.01
  offset: float32 = 0.6
  miss: float = None
)

Performs sequence and displays ticks where z is within mindistance above a pixel. Below are some helpful offsets.

block offsets
Blocks 0.6
Water/Web 0.599
Slime/Ladder 0.3
Avoid 0.0
Neo -0.6

The mindistance must be less than a pixel (0.0625).

If miss is a nonzero number, displays ticks where x is within miss below a pixel.

XPossibilities

# Other Aliases: xposs
xpossibilities(
  sequence: str = "sj45(100)"
  mindistance: float = 0.01
  offset: float32 = 0.6
  miss: float = None
)

The X axis version of zpossibilities.

XZpossibilities

coming soon!