dev.polymodloader.api.worldgen
이 페이지는 소스의 Javadoc에서 ./gradlew apiReference로 만든 것입니다. 설명은 코드에 적힌 영어 그대로입니다. 직접 고치지 말고 소스의 주석을 고친 뒤 다시 만드세요.
| 형식 | 종류 | 설명 |
|---|---|---|
BiomeDefinition | 레코드 | A biome defined in code. |
BiomeDefinition.Builder | 클래스 | Builds a BiomeDefinition. |
BiomeSelector | 인터페이스 | Chooses biomes: by ID, or by biome tag such as minecraft:is_overworld. |
BiomeSelector.ById | 레코드 | — |
BiomeSelector.ByTag | 레코드 | — |
BiomeSpawn | 레코드 | A mob that spawns in a code-defined biome. |
CodeFeature | 함수형 인터페이스 | A placed feature written in code: a boulder, a plant patch, an ore cluster with a custom shape. |
ColumnBuilder | 인터페이스 | One block column being generated; valid only during TerrainGenerator.fillColumn. |
FeatureContext | 인터페이스 | Where and with what a CodeFeature places blocks, valid only during CodeFeature.place. |
FeaturePlacement | 레코드 | Where a CodeFeature is tried in each chunk: how often, and at which height. |
GenerationStepName | 열거형 | The feature placement steps of world generation, in the order the game runs them. |
NoiseFunction | 함수형 인터페이스 | A density value per block position, used inside the game's noise terrain as a density function (WorldgenRegistrar.densityFunction). |
StructureBuilder | 함수형 인터페이스 | Builds a code structure's blocks into its box. |
StructureDefinition | 레코드 | A structure built in code: a box placed on the terrain surface at the centre of chosen chunks, filled by a StructureBuilder. |
StructureDefinition.Builder | 클래스 | Builds a StructureDefinition. |
StructurePieceContext | 인터페이스 | The box a StructureBuilder builds in, valid only during StructureBuilder.build. |
TerrainGenerator | 함수형 인터페이스 | Terrain written in code: fills each block column of new chunks. |
WorldgenRegistrar | 인터페이스 | Changes world generation. |
BiomeDefinition
레코드 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public record BiomeDefinition(float temperature, float downfall, boolean precipitation, int skyColor, Optional<Integer> fogColor, int waterColor, Optional<Integer> grassColor, Optional<Integer> foliageColor, Map<GenerationStepName,List<ResourceId>> features, List<BiomeSpawn> spawns)
A biome defined in code. Poly Mod Loader writes it as biome data into its generated data pack, so it behaves exactly like a biome from a data pack: dimensions, biome tags, and /locate biome see it. Colours are 0xRRGGBB.
| 구성 요소 | 타입 | 설명 |
|---|---|---|
temperature | float | affects snow and grass colour (plains 0.8, snowy plains 0.0) |
downfall | float | affects grass and foliage colour (plains 0.4) |
precipitation | boolean | whether it rains (or snows when cold) |
skyColor | int | sky colour |
fogColor | Optional<Integer> | fog colour, or the game's default |
waterColor | int | water colour (plains 0x3f76e4) |
grassColor | Optional<Integer> | grass colour, or computed from temperature and downfall |
foliageColor | Optional<Integer> | leaf colour, or computed |
features | Map<GenerationStepName,List<ResourceId>> | placed features per generation step |
spawns | List<BiomeSpawn> | mobs that spawn naturally |
builder()
public static BiomeDefinition.Builder builder()
추가된 버전 0.1.0-alpha.4 또는 그 이전
A builder with plains-like values and no features or spawns.
반환 BiomeDefinition.Builder
BiomeDefinition.Builder
클래스 · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public static final class Builder
Builds a BiomeDefinition.
climate(float, float, boolean)
public BiomeDefinition.Builder climate(float temperature, float downfall, boolean precipitation)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Temperature (plains 0.8), downfall (plains 0.4) and whether it rains or snows.
| 인자 | 타입 | 설명 |
|---|---|---|
temperature | float | — |
downfall | float | — |
precipitation | boolean | — |
반환 BiomeDefinition.Builder
skyColor(int)
public BiomeDefinition.Builder skyColor(int color)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Sky colour, 0xRRGGBB.
| 인자 | 타입 | 설명 |
|---|---|---|
color | int | — |
반환 BiomeDefinition.Builder
fogColor(int)
public BiomeDefinition.Builder fogColor(int color)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Fog colour, 0xRRGGBB.
| 인자 | 타입 | 설명 |
|---|---|---|
color | int | — |
반환 BiomeDefinition.Builder
waterColor(int)
public BiomeDefinition.Builder waterColor(int color)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Water colour, 0xRRGGBB.
| 인자 | 타입 | 설명 |
|---|---|---|
color | int | — |
반환 BiomeDefinition.Builder
grassColor(int)
public BiomeDefinition.Builder grassColor(int color)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Grass colour, 0xRRGGBB, instead of one computed from the climate.
| 인자 | 타입 | 설명 |
|---|---|---|
color | int | — |
반환 BiomeDefinition.Builder
foliageColor(int)
public BiomeDefinition.Builder foliageColor(int color)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Leaf colour, 0xRRGGBB, instead of one computed from the climate.
| 인자 | 타입 | 설명 |
|---|---|---|
color | int | — |
반환 BiomeDefinition.Builder
feature(GenerationStepName, ResourceId)
public BiomeDefinition.Builder feature(GenerationStepName step, ResourceId placedFeature)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Adds a placed feature, such as minecraft:trees_plains, in step.
| 인자 | 타입 | 설명 |
|---|---|---|
step | GenerationStepName | — |
placedFeature | ResourceId | — |
반환 BiomeDefinition.Builder
spawn(MobCategory, ResourceId, int, int, int)
public BiomeDefinition.Builder spawn(MobCategory category, ResourceId type, int weight, int minGroup, int maxGroup)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Adds a naturally spawning mob.
| 인자 | 타입 | 설명 |
|---|---|---|
category | MobCategory | — |
type | ResourceId | — |
weight | int | — |
minGroup | int | — |
maxGroup | int | — |
반환 BiomeDefinition.Builder
build()
public BiomeDefinition build()
추가된 버전 0.1.0-alpha.4 또는 그 이전
Creates the definition.
반환 BiomeDefinition
BiomeSelector
인터페이스 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public sealed interface BiomeSelector
Chooses biomes: by ID, or by biome tag such as minecraft:is_overworld.
ids(ResourceId[])
static BiomeSelector ids(ResourceId... ids)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Biomes with one of these IDs.
| 인자 | 타입 | 설명 |
|---|---|---|
ids | ResourceId[] | — |
반환 BiomeSelector
tag(ResourceId)
static BiomeSelector tag(ResourceId tag)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Biomes in this tag.
| 인자 | 타입 | 설명 |
|---|---|---|
tag | ResourceId | — |
반환 BiomeSelector
BiomeSelector.ById
레코드 · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public static record ById(Set<ResourceId> ids) implements BiomeSelector
| 구성 요소 | 타입 | 설명 |
|---|---|---|
ids | Set<ResourceId> | biome IDs |
상위 형식: BiomeSelector
BiomeSelector.ByTag
레코드 · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public static record ByTag(ResourceId tag) implements BiomeSelector
| 구성 요소 | 타입 | 설명 |
|---|---|---|
tag | ResourceId | biome tag ID, without # |
상위 형식: BiomeSelector
BiomeSpawn
레코드 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public record BiomeSpawn(MobCategory category, ResourceId type, int weight, int minGroup, int maxGroup)
A mob that spawns in a code-defined biome.
| 구성 요소 | 타입 | 설명 |
|---|---|---|
category | MobCategory | spawn group |
type | ResourceId | entity type, for example minecraft:sheep |
weight | int | chance relative to other mobs of the category |
minGroup | int | smallest group |
maxGroup | int | largest group |
CodeFeature
함수형 인터페이스 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public interface CodeFeature
A placed feature written in code: a boulder, a plant patch, an ore cluster with a custom shape. Called on world generation threads while chunks generate, possibly for several chunks at once; keep all state in local variables and take randomness only from FeatureContext.random().
place(FeatureContext)
boolean place(FeatureContext context)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Places the feature around FeatureContext.origin().
| 인자 | 타입 | 설명 |
|---|---|---|
context | FeatureContext | — |
반환 boolean — whether anything was placed
ColumnBuilder
인터페이스 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public interface ColumnBuilder
One block column being generated; valid only during TerrainGenerator.fillColumn.
minY()
int minY()
추가된 버전 0.1.0-alpha.4 또는 그 이전
Lowest Y of the dimension.
반환 int
maxY()
int maxY()
추가된 버전 0.1.0-alpha.4 또는 그 이전
Highest Y of the dimension (inclusive).
반환 int
seed()
long seed()
추가된 버전 0.1.0-alpha.4 또는 그 이전
A number derived from the world seed and the generator ID, the same for every column.
반환 long
set(int, ResourceId)
void set(int y, ResourceId block)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Sets the default state of block at y; positions outside the dimension are ignored.
| 인자 | 타입 | 설명 |
|---|---|---|
y | int | — |
block | ResourceId | — |
예외 IllegalArgumentException — for an unknown block
fill(int, int, ResourceId)
default void fill(int fromY, int toY, ResourceId block)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Sets block from fromY to toY, both inclusive.
| 인자 | 타입 | 설명 |
|---|---|---|
fromY | int | — |
toY | int | — |
block | ResourceId | — |
FeatureContext
인터페이스 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public interface FeatureContext
Where and with what a CodeFeature places blocks, valid only during CodeFeature.place. The world being generated is the chunk of the origin and its neighbours; keep blocks within 16 blocks of the origin horizontally. Positions are world coordinates.
origin()
BlockPos origin()
추가된 버전 0.1.0-alpha.4 또는 그 이전
The position the placement chose, for example on the surface or at a random height.
반환 BlockPos
random()
RandomGenerator random()
추가된 버전 0.1.0-alpha.4 또는 그 이전
Randomness for this placement; the same world seed and position give the same values.
반환 RandomGenerator
blockAt(BlockPos)
ResourceId blockAt(BlockPos pos)
추가된 버전 0.1.0-alpha.4 또는 그 이전
The block at pos, without properties.
| 인자 | 타입 | 설명 |
|---|---|---|
pos | BlockPos | — |
반환 ResourceId
isAir(BlockPos)
boolean isAir(BlockPos pos)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Whether pos is air.
| 인자 | 타입 | 설명 |
|---|---|---|
pos | BlockPos | — |
반환 boolean
setBlock(BlockPos, ResourceId)
void setBlock(BlockPos pos, ResourceId block)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Sets the default state of block at pos.
| 인자 | 타입 | 설명 |
|---|---|---|
pos | BlockPos | — |
block | ResourceId | — |
예외 IllegalArgumentException — if block is not a block
surfaceY(int, int)
int surfaceY(int x, int z)
추가된 버전 0.1.0-alpha.4 또는 그 이전
The y of the first air block above the terrain at x, z, as generation sees it so far.
| 인자 | 타입 | 설명 |
|---|---|---|
x | int | — |
z | int | — |
반환 int
minY()
int minY()
추가된 버전 0.1.0-alpha.4 또는 그 이전
The lowest block y of the world.
반환 int
maxY()
int maxY()
추가된 버전 0.1.0-alpha.4 또는 그 이전
The highest block y of the world.
반환 int
FeaturePlacement
레코드 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public record FeaturePlacement(int countPerChunk, int rarity, boolean onSurface, int minY, int maxY)
Where a CodeFeature is tried in each chunk: how often, and at which height. Poly Mod Loader writes it as the placed feature with the feature's ID, the same as one from a data pack.
| 구성 요소 | 타입 | 설명 |
|---|---|---|
countPerChunk | int | tries per chunk, each at a random x and z in the chunk |
rarity | int | each try happens in 1 of rarity chunks; 1 for every chunk |
onSurface | boolean | whether tries start on the terrain surface; otherwise at a random y in minY..maxY |
minY | int | lowest y for tries below the surface |
maxY | int | highest y for tries below the surface |
onSurface(int)
public static FeaturePlacement onSurface(int countPerChunk)
추가된 버전 0.1.0-alpha.4 또는 그 이전
countPerChunk tries on the surface of each chunk.
| 인자 | 타입 | 설명 |
|---|---|---|
countPerChunk | int | — |
반환 FeaturePlacement
atHeight(int, int, int)
public static FeaturePlacement atHeight(int countPerChunk, int minY, int maxY)
추가된 버전 0.1.0-alpha.4 또는 그 이전
countPerChunk tries at random heights from minY to maxY in each chunk.
| 인자 | 타입 | 설명 |
|---|---|---|
countPerChunk | int | — |
minY | int | — |
maxY | int | — |
반환 FeaturePlacement
rarity(int)
public FeaturePlacement rarity(int rarity)
추가된 버전 0.1.0-alpha.4 또는 그 이전
This placement in only 1 of rarity chunks.
| 인자 | 타입 | 설명 |
|---|---|---|
rarity | int | — |
반환 FeaturePlacement
GenerationStepName
열거형 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public enum GenerationStepName
The feature placement steps of world generation, in the order the game runs them.
| 상수 | 설명 |
|---|---|
RAW_GENERATION | — |
LAKES | — |
LOCAL_MODIFICATIONS | — |
UNDERGROUND_STRUCTURES | — |
SURFACE_STRUCTURES | — |
STRONGHOLDS | — |
UNDERGROUND_ORES | — |
UNDERGROUND_DECORATION | — |
FLUID_SPRINGS | — |
VEGETAL_DECORATION | — |
TOP_LAYER_MODIFICATION | — |
NoiseFunction
함수형 인터페이스 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public interface NoiseFunction
A density value per block position, used inside the game's noise terrain as a density function (WorldgenRegistrar.densityFunction). In the game's terrain, positive final density is solid and negative is air or water, so a function can raise, carve or reshape terrain while the game keeps its caves, aquifers, ores, surface rules and biomes.
The game computes noise terrain in cells (noise.size_horizontal × 4 by noise.size_vertical × 4 blocks) and blends the final density inside a cell, so shapes smaller than a cell come out smoothed and a surface may be a block off the exact value.
Called extremely often from several world generation threads at once: it must be fast, keep no state, and give the same value for the same position every time.
compute(int, int, int)
double compute(int x, int y, int z)
추가된 버전 0.1.0-alpha.4 또는 그 이전
The density at block x, y, z.
| 인자 | 타입 | 설명 |
|---|---|---|
x | int | — |
y | int | — |
z | int | — |
반환 double
StructureBuilder
함수형 인터페이스 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public interface StructureBuilder
Builds a code structure's blocks into its box. Called on world generation threads, once per chunk the box touches (see StructurePieceContext); keep all state in local variables.
build(StructurePieceContext)
void build(StructurePieceContext context)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Writes the structure's blocks through context.
| 인자 | 타입 | 설명 |
|---|---|---|
context | StructurePieceContext | — |
StructureDefinition
레코드 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public record StructureDefinition(int sizeX, int sizeY, int sizeZ, int yOffset, BiomeSelector biomes, int spacing, int separation, GenerationStepName step, boolean adaptTerrain, StructureBuilder builder)
A structure built in code: a box placed on the terrain surface at the centre of chosen chunks, filled by a StructureBuilder. Poly Mod Loader writes the structure and its structure set into the generated data pack, so /locate structure and /place structure work with its ID.
| 구성 요소 | 타입 | 설명 |
|---|---|---|
sizeX | int | box size along x, 1–128 |
sizeY | int | box size along y, 1–256 |
sizeZ | int | box size along z, 1–128 |
yOffset | int | where the box's bottom is relative to the surface; negative sinks it into the ground |
biomes | BiomeSelector | where it may generate |
spacing | int | average distance between structures, in chunks (village 34) |
separation | int | minimum distance between structures, in chunks; less than spacing |
step | GenerationStepName | the generation step it is built in |
adaptTerrain | boolean | whether the terrain is smoothed around it, like around a village |
builder | StructureBuilder | builds its blocks |
builder(int, int, int, StructureBuilder)
public static StructureDefinition.Builder builder(int sizeX, int sizeY, int sizeZ, StructureBuilder builder)
추가된 버전 0.1.0-alpha.4 또는 그 이전
A builder for a sizeX × sizeY × sizeZ structure built by builder.
| 인자 | 타입 | 설명 |
|---|---|---|
sizeX | int | — |
sizeY | int | — |
sizeZ | int | — |
builder | StructureBuilder | — |
반환 StructureDefinition.Builder
StructureDefinition.Builder
클래스 · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public static final class Builder
Builds a StructureDefinition.
yOffset(int)
public StructureDefinition.Builder yOffset(int yOffset)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Raises (or with a negative value sinks) the box relative to the surface; 0 by default.
| 인자 | 타입 | 설명 |
|---|---|---|
yOffset | int | — |
반환 StructureDefinition.Builder
biomes(BiomeSelector)
public StructureDefinition.Builder biomes(BiomeSelector biomes)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Where it may generate; every overworld biome (#minecraft:is_overworld) by default.
| 인자 | 타입 | 설명 |
|---|---|---|
biomes | BiomeSelector | — |
반환 StructureDefinition.Builder
spacing(int, int)
public StructureDefinition.Builder spacing(int spacing, int separation)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Average and minimum distance between structures in chunks; 32 and 8 by default.
| 인자 | 타입 | 설명 |
|---|---|---|
spacing | int | — |
separation | int | — |
반환 StructureDefinition.Builder
step(GenerationStepName)
public StructureDefinition.Builder step(GenerationStepName step)
추가된 버전 0.1.0-alpha.4 또는 그 이전
The generation step; GenerationStepName.SURFACE_STRUCTURES by default.
| 인자 | 타입 | 설명 |
|---|---|---|
step | GenerationStepName | — |
반환 StructureDefinition.Builder
adaptTerrain()
public StructureDefinition.Builder adaptTerrain()
추가된 버전 0.1.0-alpha.4 또는 그 이전
Smooths the terrain around the box, like around a village.
반환 StructureDefinition.Builder
build()
public StructureDefinition build()
추가된 버전 0.1.0-alpha.4 또는 그 이전
Creates the definition; invalid values throw IllegalArgumentException.
반환 StructureDefinition
StructurePieceContext
인터페이스 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public interface StructurePieceContext
The box a StructureBuilder builds in, valid only during StructureBuilder.build. Coordinates are relative to the box's lowest corner, from 0 to size - 1 on each axis; blocks outside the box are ignored.
A structure larger than one chunk is built chunk by chunk: the builder is called once for each chunk the box touches, with the same random() sequence each time, and only the blocks in that chunk are written. Build the same structure on every call.
origin()
BlockPos origin()
추가된 버전 0.1.0-alpha.4 또는 그 이전
World position of the box's lowest corner.
반환 BlockPos
sizeX()
int sizeX()
추가된 버전 0.1.0-alpha.4 또는 그 이전
Box size along x.
반환 int
sizeY()
int sizeY()
추가된 버전 0.1.0-alpha.4 또는 그 이전
Box size along y.
반환 int
sizeZ()
int sizeZ()
추가된 버전 0.1.0-alpha.4 또는 그 이전
Box size along z.
반환 int
random()
RandomGenerator random()
추가된 버전 0.1.0-alpha.4 또는 그 이전
Randomness for this structure; the same on every call for the same structure.
반환 RandomGenerator
blockAt(int, int, int)
ResourceId blockAt(int x, int y, int z)
추가된 버전 0.1.0-alpha.4 또는 그 이전
The block at a box position, without properties.
| 인자 | 타입 | 설명 |
|---|---|---|
x | int | — |
y | int | — |
z | int | — |
반환 ResourceId
setBlock(int, int, int, ResourceId)
void setBlock(int x, int y, int z, ResourceId block)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Sets the default state of block at a box position.
| 인자 | 타입 | 설명 |
|---|---|---|
x | int | — |
y | int | — |
z | int | — |
block | ResourceId | — |
예외 IllegalArgumentException — if block is not a block
fill(int, int, int, int, int, int, ResourceId)
default void fill(int x1, int y1, int z1, int x2, int y2, int z2, ResourceId block)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Fills the box positions from (x1, y1, z1) to (x2, y2, z2), both included.
| 인자 | 타입 | 설명 |
|---|---|---|
x1 | int | — |
y1 | int | — |
z1 | int | — |
x2 | int | — |
y2 | int | — |
z2 | int | — |
block | ResourceId | — |
TerrainGenerator
함수형 인터페이스 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public interface TerrainGenerator
Terrain written in code: fills each block column of new chunks. Registered with WorldgenRegistrar.chunkGenerator, it is used by dimensions in data packs with "generator": {"type": "<mod id>:<path>", "biome_source": {...}}. Biome features (ores, trees) and structures are added afterwards by the game as for any generator.
Threads: called on the game's world generation threads, several columns at once; the code must be thread-safe and give the same column for the same position and seed.
fillColumn(int, int, ColumnBuilder)
void fillColumn(int x, int z, ColumnBuilder column)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Fills the column at world position x, z; unset blocks stay air.
| 인자 | 타입 | 설명 |
|---|---|---|
x | int | — |
z | int | — |
column | ColumnBuilder | — |
seaLevel()
default int seaLevel()
추가된 버전 0.1.0-alpha.4 또는 그 이전
Sea level of dimensions using this generator; the game spawns water mobs and fish below it.
반환 int
WorldgenRegistrar
인터페이스 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전
public interface WorldgenRegistrar
Changes world generation. The features themselves are data: put data/<mod id>/worldgen/configured_feature/*.json and placed_feature/*.json in the mod jar, in the game's format. Custom dimensions are data too (dimension/, dimension_type/). This registrar attaches placed features to existing biomes, which data alone cannot do without replacing the biome files.
When: common entrypoints. Applied every time a server loads its worlds; affects chunks generated afterwards.
addFeature(BiomeSelector, GenerationStepName, ResourceId)
void addFeature(BiomeSelector biomes, GenerationStepName step, ResourceId placedFeature)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Adds a placed feature at the end of step in every selected biome.
| 인자 | 타입 | 설명 |
|---|---|---|
biomes | BiomeSelector | — |
step | GenerationStepName | — |
placedFeature | ResourceId | ID of a placed feature from any data pack, for example the mod's own |
chunkGenerator(String, TerrainGenerator)
ResourceId chunkGenerator(String path, TerrainGenerator generator)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Registers terrain written in code as generator type <mod id>:<path>, for dimensions in data packs.
| 인자 | 타입 | 설명 |
|---|---|---|
path | String | — |
generator | TerrainGenerator | — |
반환 ResourceId — the generator type ID
예외 IllegalArgumentException — for an invalid or used path (POLY-WORLDGEN-001)
biome(String, BiomeDefinition)
ResourceId biome(String path, BiomeDefinition definition)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Defines biome <mod id>:<path> in code. Use it in dimensions and biome tags like a biome from a data pack.
| 인자 | 타입 | 설명 |
|---|---|---|
path | String | — |
definition | BiomeDefinition | — |
반환 ResourceId — the biome ID
feature(String, FeaturePlacement, CodeFeature)
ResourceId feature(String path, FeaturePlacement placement, CodeFeature feature)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Registers a feature written in code as feature type <mod id>:<path>, and writes a configured and a placed feature with the same ID into Poly Mod Loader's generated data pack. Add it to biomes with addFeature, place it with /place feature <id>, or use the type in the mod's own data pack.
| 인자 | 타입 | 설명 |
|---|---|---|
path | String | — |
placement | FeaturePlacement | — |
feature | CodeFeature | — |
반환 ResourceId — the feature ID
예외 IllegalArgumentException — for an invalid or used path (POLY-WORLDGEN-004)
densityFunction(String, double, double, NoiseFunction)
ResourceId densityFunction(String path, double minValue, double maxValue, NoiseFunction function)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Registers a density function written in code as type <mod id>:<path>. Data packs use it inside the game's noise terrain, for example in a noise settings' final_density: {"type": "minecraft:add", "argument1": …, "argument2": {"type": "<mod id>:<path>"}}.
| 인자 | 타입 | 설명 |
|---|---|---|
path | String | — |
minValue | double | the lowest value function returns; the game uses the bounds to skip work |
maxValue | double | the highest value function returns |
function | NoiseFunction | — |
반환 ResourceId — the density function type ID
예외 IllegalArgumentException — for an invalid or used path (POLY-WORLDGEN-004) or minValue > maxValue
structure(String, StructureDefinition)
ResourceId structure(String path, StructureDefinition definition)
추가된 버전 0.1.0-alpha.4 또는 그 이전
Registers a structure built in code as <mod id>:<path>, with its structure set, in Poly Mod Loader's generated data pack. It generates in new chunks of the selected biomes; /locate structure and /place structure find and place it.
| 인자 | 타입 | 설명 |
|---|---|---|
path | String | — |
definition | StructureDefinition | — |
반환 ResourceId — the structure ID
예외 IllegalArgumentException — for an invalid or used path (POLY-WORLDGEN-004)