Skip to content

API reference / @jsprismarine/prismarine / world/generators/datadriven/javaWorldgenSources

world/generators/datadriven/javaWorldgenSources ​

Interfaces ​

JavaWorldgenSources ​

Defined in: packages/prismarine/src/world/generators/datadriven/javaWorldgenSources.ts:25

The two directories the registries are read out of.

Properties ​

datapack ​

readonly datapack: string

Defined in: packages/prismarine/src/world/generators/datadriven/javaWorldgenSources.ts:27

The datapack root, the directory holding data/.

reports ​

readonly reports: string

Defined in: packages/prismarine/src/world/generators/datadriven/javaWorldgenSources.ts:29

The data generator output root, the directory holding reports/.

Variables ​

JAVA_WORLDGEN_ENV ​

const JAVA_WORLDGEN_ENV: object

Defined in: packages/prismarine/src/world/generators/datadriven/javaWorldgenSources.ts:17

Points the loader at a local copy of one fetched source.

Type Declaration ​

datapack ​

readonly datapack: "JSP_VANILLA_DATAPACK" = 'JSP_VANILLA_DATAPACK'

A Java vanilla datapack directory, as the Java data generator writes one.

reports ​

readonly reports: "JSP_JAVA_REPORTS" = 'JSP_JAVA_REPORTS'

A Java data generator output directory, the one holding reports/.

Functions ​

cacheRoot() ​

cacheRoot(): string

Defined in: packages/prismarine/src/world/generators/datadriven/javaWorldgenSources.ts:33

The nearest existing node_modules/.cache/jsprismarine at or above the working directory.

Returns ​

string


findJavaWorldgenSources() ​

findJavaWorldgenSources(release?): JavaWorldgenSources | undefined

Defined in: packages/prismarine/src/world/generators/datadriven/javaWorldgenSources.ts:74

Finds the datapack and the data generator reports of one Java release.

Parameters ​

release? ​

string = javaServerCacheFolder

The pinned Java release whose data to read, such as the server's content-java-version. Defaults to the release sources.json names as the default. The environment overrides win over it.

Returns ​

JavaWorldgenSources | undefined

Both directories, or undefined when either is missing. The generator needs both, and half the data produces a world that is quietly not Java's.