UtilityBiome:Biome Census

From MutigerAffe Wiki
Jump to navigation Jump to search

A biome census samples an area of the world generator and counts which biomes occur there. It is useful to check a seed before you open a server, to see how big and how common the biomes of a world-generation mod are, and to add hard numbers to a bug report. It reads the world generator only, so no chunks are generated and nobody has to fly there.

There are two ways to run one: the command /ub census and a census at server start.

The report

The first line names the centre, radius and step, the number of samples and how many different biomes were found. Below it comes one line per biome, sorted by share:

Part Meaning
Share in % How much of the sampled area this biome covers.
Name The biome as Zone/Tile.Name or Zone/Custom.Name.
Nearest Position of the sample of this biome closest to the centre, and its distance in blocks.
Patches How many separate patches of this biome were found. Neighbouring samples of the same biome, diagonals included, count as one patch.
Average / largest width How wide an average patch and the largest patch are, given as the side of a square of the same area.

Patches at the edge of the area are cut off and count smaller than they are. With a filter, only the matching biomes are listed, but the shares still refer to the whole area.

The number of samples grows quickly: a radius of 2000 with step 32 means about 16,000 samples. For large areas use a larger step.

/ub census

The command samples the default world around a point you choose (by default (0, 0), not your position). The options are listed on Commands. Examples:

  • /ub census: 4000 × 4000 blocks around (0, 0), one sample every 32 blocks.
  • /ub census --radius 6000 --step 64 --filter BetterBiomes_: a larger area, only the biomes of Better Biomes listed.
  • /ub census --x 12000 --z -3000 --radius 1000 --step 16: a detailed look at one region.

Census at server start

Server admins can let Utility Biome run a census automatically once all worlds have loaded. This works without anyone joining. Set the environment variable UTILITYBIOME_CENSUS before starting the server:

UTILITYBIOME_CENSUS=radius[:step[:prefix]]
  • radius: half the side length in blocks (0 or more). Unlike the command, there is no upper limit.
  • step: distance between samples, default 32.
  • prefix: optional, only biomes whose name starts with it are listed and highlighted.
  • The centre is always (0, 0) of the default world.

Example: UTILITYBIOME_CENSUS=4000:32:BetterBiomes_

The result goes to the server log, every line starting with Start-Census::

  • the number of loaded biomes and the ones matching the prefix,
  • with a prefix: the matching cave types and ores per zone,
  • the full report described above,
  • a map image.

The census map

Utility Biome writes the file census-map.png into the working directory of the server. It has one pixel per sample, north is up, and a cross marks (0, 0). Biomes that match the prefix get strong colours. All other biomes get a muted colour per zone, with Custom biomes such as rivers and mountains a little darker. The log lists which colour belongs to which biome and zone. On the map you can see how big a biome is, what shape it has, and where zone borders, rivers or mountains cut it off.

If the value of the variable cannot be read, the log shows a warning and no census runs.

Utility Biome
Installation · Commands · Biome Census · Version History
For modders: Modding API · Chunk Features · Structures · Build-Time Tools
Project page on mutigeraffe.com · Download on CurseForge