ikbLib

ikbLib

An API for density functions that use the world seed, voronoi/cellular noise, and new fluid behaviors

125 downloads
3 followers

ikbLib is a library mod featuring a family of new voronoi/cellular noise density functions, plus API for seeded density functions and new fluid behaviours. For full documentation, see the Wiki.

Voronoi Noise

An image composed of several regions; each one is a different color and contains a black dot. The regions form irregular shapes with straight sides, and each side sits exactly in the middle of two neighboring points.

If you were to drop many different colors of paint onto a canvas, then let each color spread from the point where it falls, you would get a kind of image called a voronoi diagram. These diagrams are the basis of voronoi noise, also called cellular noise because it resembles a microscopic view of plant or animal cells.

ikbLib adds three new density functions that this type of noise:

  • "ikblibrary:voronoi": A basic voronoi noise function, which can output the distance from center, value, or velocity of the current cell or a neighboring cell. A defined "scale" parameter is required, but all other parameters are optional and revert to default if omitted.
  • "ikblibrary:cached_voronoi" & "ikblibrary:pull_cached_voronoi": A pair of technical functions. These have the same outputs and configurations as the basic voronoi noise, but are optimized for sampling several different values from a single voronoi diagram.

Seeded Density Functions

ikbLib adds a new interface called SeededDensityFunction which other mod developers can use to easily pass the world's seed into their own density functions. See the Wiki or Github repository for implementation details.

Stackable Fluids

ikbLib creates a simple, data-driven* system for making fluids that flow under and over other fluids. Simply add the stackable_wet or stackable_molten tag to a group of fluids, and watch them stack!

A minecraft screenshot of blue water shown flowing on top of a fluid which looks like turquoise water.

*For full effectiveness, ensure each fluid has a defined density in NeoForge's fluid API. When two fluids meet, the denser of the two will flow through and under the lighter fluid.

No gallery available for this project.