Home - anon-noob/mothball GitHub Wiki

Welcome to the Mothball Wiki!

Mothball is a discord bot but also a powerful tool to calculate Minecraft movement with high precision without having to open Minecraft. In particular, Mothball is used in parkour, from running quick calculations to strategizing difficult jumps. To run Mothball calculations, first add it to your desired discord server!

Commands

All Mothball commands start with a semicolon ;. Below are Mothball's simulation commands.

  • ;simulate (or ;sim or ;s): Simulates the sequence of functions and displays the output in color.
    • Use ;ns (no color simulate) to display outputs without color.
  • ;history (or ;h): Simulates the sequence of functions and displays tick by tick results.
  • ;then: Reply to a simulation for it to work. ;then will continue the simulation where the replied message left off.
  • ;thenh: combination of ;then and ;history
  • ;height: see height()
  • ;ji: see ji()
  • ;version: displays the Mothball version alongside recent updates.

And these are additional miscs.

  • ;love: finds all compatible romantic interests (ONLY ONLINE, NO GUARANTEE OF WORKING IN REAL LIFE)
  • ;quote: randomly selects and returns a random message from a channel.

Here's what a full simualation would look like. Notice that it starts with ;s.

Example: ;s bwmm(5, sj(12) sj45(12)) | sj45(12) zb

An example simulation of mothball.

Picture of an example usage of mothball

Functions and its Syntax

Everything that precedes the initial command (such as ;s or ;h) are all functions. The syntax is function{.<inputs>}{[modifiers]}{(<*args>)} where everything inside {} are optional. Let's break it down.

Calling a Function

function is simply the function name. In Mothball, you don't need parenthesis to call a function. For example, sprint is equivalent to sprint().

Adding Inputs

inputs denotes key presses for in game movement. Since the default movement keys is wasd, inputs uses the wasd keys.

Some functions can be called with inputs. To add inputs to a function, use the syntax function.inputs For example, sprint.wd calls the sprint function with inputs wd, in other words, moving forward and right.

These inputs are useful for simulations: w, a, s, d, wa, wd, sa, sd. If no input is provided, it is defaulted to w.

Negating Inputs with -

Some functions can have a dash - prepended, for example -sprint.wd. The - flips the inputs, so -sprint.wd is equivalent to sprint.sa. Likewise, -sprint is equivalent to sprint.s.

For the sake of clarity and readability, it is recommended to only use the - syntax as an alternative to function.s (unless you're calculating movement resulting from glitches).

Modifying movement

modifiers denotes certain movement modifications. In particular, it is meant simulate any combination of the following: water, lava, web, (sword) blocking, and ladder.

To add these modifiers, use the syntax function[modifiers]. For example, sprint[water, web]. Modifiers come after the inputs, so the syntax is function.inputs[modifiers]. For example, walkair.sd[blocking].

As a bonus fact, combining water and lava is equivalent to just water.

Adding Arguments

Normally you don't need to add arguments to be able to use functions, but adding arguments allows greater control and flexibility in your simulations.

To add arguments to a function, surround your arguments in parenthesis and separate each argument with commas. Append at the end of the function or function.inputs. For example, sprint(1,2) or sprint.wa(4,3).

Arguments can either be positional or keyword (i.e. in the form keyword = value). For example, the function call sprint(2, slip=3) has a positional argument 2 and a keyword argument named slip equal to 3.

Reading the Documentation

We use Python syntax to document a function's arguments. For this documentation, arg: type = default means that the argument called arg must be a(n) type with a default argument of default. For example, speed: int = 0 means that the argument speed must be an int (short for integer) which defaults to 0.

Additionally, we differentiate positional and keyword arguments. Anything before a * denotes positional OR keyword argument. Anything after a * denotes a STRICTLY keyword argument.

Here's a real, sample function documentation

walk(
  duration: int = 1,
  rotation: float = None,
  *
  slip: float = None,
  speed: int = None,
  slow: int = None
)

The argument duration defaults to 1 while the other arguments defaults to None.

duration, speed, and slow must be integers while rotation and silp are floats.

duration and rotation can either be a positional or keyword argument, but slip, speed, and slow must be keyword arguments.

Comments

Comments are delimited by the # symbol. Anything between them will be ignored when calculating. For example, the simulation ;s s(2) #hello# sa(2) #sprint(3)# outz #world is equivalent to ;s s(2) sa(2) outz. Comments can be multiline.

Types of Functions

There are 4 types of functions.

  1. Movement Functions: The most important and most frequently used functions. These functions simply move the player.
  2. Output Functions: These functions output information, such as the current position or speed.
  3. Setters: These functions set the player's attribute at that tick, for example speed, position, and angle.
  4. Calculators: These functions perform calculations other than movement, for example, finding the minimum speed required to land a jump.

Usage Tutorial

It is recommended that you have some experience playing and strategizing minecraft parkour in order to understand how to use Mothball. While Minecraft is the physical universe, Mothball abstractifies Minecraft movement down to its pure numbers. Understanding Mothball sequences and outputs will be important in order to turn the abstraction back into the physical Minecraft universe.

Feeling brave? Click here for the tutorial [INSERT LINK HERE].

⚠️ **GitHub.com Fallback** ⚠️