Worlds
Config

World settings (config.json)

PNX supports loading worlds from BDS, you just need to place them under the folder worlds to load them. After loading the world, a config.json will be generated to control some world-related settings.

Example

The following is a config example used to start the built-in Terra terrain generator in PNX and use its default config pack. Remember to turn on use-terra in server.properties before using it.

config.json
{
  "format": "leveldb",
  "enable": true,
  "generators": {
    "0": {
      "name": "terra",
      "seed": 0,
      "enableAntiXray": false,
      "antiXrayMode": "LOW",
      "preDeobfuscate": true,
      "dimensionData": {
        "dimensionName": "minecraft:overworld",
        "dimensionId": 0,
        "minHeight": -64,
        "maxHeight": 319,
        "height": 384,
        "chunkSectionCount": 24
      },
      "preset": {
        "pack": "overworld"
      }
    }
  }
}

Config items

DimensionData: object

Overworld

config.json
{
    "dimensionName": "minecraft:overworld",
    "dimensionId": 0,
    "minHeight": -64,
    "maxHeight": 319,
    "height": 384,
    "chunkSectionCount": 24
}

Nether

config.json
{
    "dimensionName": "minecraft:nether",
    "dimensionId": 1,
    "minHeight": 0,
    "maxHeight": 127,
    "height": 128,
    "chunkSectionCount": 8
}

End

config.json
{
    "dimensionName": "minecraft:end",
    "dimensionId": 2,
    "minHeight": 0,
    "maxHeight": 255,
    "height": 256,
    "chunkSectionCount": 16
}

enable: boolean

Value: true false

Controls whether to load this world, default is true

format: string

Value: leveldb

Controls the loader for loading the world, currently only supports leveldb

generators: object

Key: DimensionId | The key representing the dimension ID to load (0, 1, 2)
Value: Generator

Controls the dimensions which should be loaded for this world

Generator: object

  • name | Name of the generator, used to control the terrain generator used by this dimension, such as terra, specific values are determined by plugins and core
  • seed | Seed used for random number generation
  • enableAntiXray | Whether to enable anti Xray anti-cheat
  • antiXrayMode | Anti Xray anti-cheat check level, effective only when enableAntiXray is enabled (LOW, MEDIUM, HIGH)
  • preDeobfuscate | Whether to pre-deobfuscate blocks, which can optimize the experience of normal players, effective only when enableAntiXray is enabled (true, false)
  • dimensionData | DimensionData
  • preset | An object whose values are passed to the generator, how to use them needs to be checked in the corresponding generator's documentation

PNX Built-in Generators

Flat

A flat generator, very similar to the vanilla

Terra

For a detailed description on how to generate worlds with Terra, check out our documentation page here.

Why Settings Do Not Take Effect

  • If your world was not previously using the terra generator, the settings will not take effect, you need to create a new world.
  • Please check if you have configured Terra correctly, otherwise it will not take effect.

Too Much Memory Usage

If you want to reduce memory usage, you can try modifying ./terra/config/yml

config.yml
cache:
  structure: 0 # default 32
  sampler: 0 # default 128
  biome-provider: 0 # default 32

This will reduce memory usage but will increase CPU load.