Open Terrain Generator (OTG)

Open Terrain Generator (OTG)

10M Downloads

Feature: 1.16.x - Blockstate dictionaries

SXRWahrheit opened this issue ยท 3 comments

commented

For 1.16 and beyond, OTG needs to support blockstates. To facilitate creative endeavors, the OTG Team has discussed and (provisionally) agreed upon a means of utilizing shorthand for specific blocks and blockstates, looking something like this in the context of a BO3/BO4:

#######################################################################
# +-----------------------------------------------------------------+ #
# |                              States                             | #
# +-----------------------------------------------------------------+ #
#######################################################################

Define(snowygrass, minecraft:grass[snowy=true]) <- All these lines need to be validated to make sure the block can have that state

#######################################################################
# +-----------------------------------------------------------------+ #
# |                              Blocks                             | #
# +-----------------------------------------------------------------+ #
#######################################################################

Block(0,0,0,snowygrass)

The vanilla format must also be able to be parsed, e.g. Block(0,0,0,minecraft:oak_fence[west=false,east=false,north=true,south=true]). That is to say, dictionary usage is not mandatory.

commented

For 1.16.x, we'll start by ignoring block data (use default state), we can add this after the main features (biome/chunkgen/population) have been implemented.

commented

Blockstate support has been added, dictionaries not yet.

commented

Current idea:

  • Add "BlockMappings" folder to preset root, users can add their blockmappings files there.
  • Add "BlockMappingsFiles" setting to the WorldConfig, targets files by name, it's used when reading WorldConfig/BiomeConfigs.
  • Add "BlockMappingsFiles" setting to BO3/BO4. From each BO3/BO4 target files by name.

People should use unique block mappings file names, to avoid any conflicts when copying BO's and block mappings files to other presets. We can create a default block mappings file, used for our presets. When creating new block mappings, users can create their own file and add it after the defaults (editing the default file is not recommended as it maintained by us).