Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 1.89 KB

README.md

File metadata and controls

37 lines (25 loc) · 1.89 KB

Janerator

A mod for using multiple types of generators in a single Minecraft world to have more varied terrain, such as flat and normal.

This is done by graphing an inequality on the horizontal plane (x and z coordinates) of the world and then using an alternate generator for where that inequality returns true. By creating a more complex inequality, you can make a world take almost any shape, just like how the base game allows for endless creativity!

A blue-green spiral generated using the mod

Graphing Inequalities

Using an example inequality x > z will create its respective graph in-game:

A world with a line dividing flat and normal terrain

You can also define variables, which can then be used in a final inequality which is what decides where each type of generator is used.

For example, the first screenshot can be created using the following variables and inequality:

variables: [
    "phi = (1 + sqrt(5)) / 2",
    "log_phi = ln(phi)",
    "dist_squared = x^2 + z^2",
    "angle = ln(dist_squared) / log_phi"
],
inequality: "(z - x * tan(angle)) * sgn(tan(angle) * csc(angle)) > 0"

All math is parsed and evaluated using mXparser, so you can use its own docs where relevant to help you write equations.

Built-in Functions and variables