Skip to content
This repository has been archived by the owner on Nov 24, 2024. It is now read-only.

Datapack Guide

Corgi Taco edited this page May 11, 2022 · 12 revisions

1.18 Datapacking Guide

Recommended Programs to install

Before Starting

This tutorial will rely on BYG's /worldgenexport command to generate the datapack for the current world for all mod spaces. Once you run this command.


Datapack Structure

The datapack structure is as follows: datapack/data/namespace(modid)/worldgen/world_gen_object_type

world_gen_object_type may be one of the following:

  • biome
  • configured_carver
  • configured_feature
  • configured_structure_feature
  • density_function
  • noise
  • noise_settings
  • placed_feature
  • processor_list
  • structure_set
  • template_pool

image

within each of these directories are configurations for the different types of world gen objects

biome

Biomes contain the following information used by the Minecraft world:

carvers

  • These are the small caves that generate and should not be confused with noise caves.
  • Have both air & liquid filling stages and use a list of configured_carver.

category

  • The category most related to this biome.
  • Bare in mind Category as of 1.18 has been replaced with biome tags in most places within MC, and is marked for removal in 1.19!
  • Category may be any of the following values: none, taiga, extreme_hills, jungle, mesa, plains, savanna, icy, the_end, beach, forest, ocean, desert, river, swamp, mushroom, nether, underground, mountain.

downfall

  • Effectively humidity and is used by fire to determine the flammability in this biome, higher value means more humid.

effects

  • The CLIENT ONLY information stored within this biome.

features

  • 11 lists of placed_features for each generation step of the FEATURES generation stage.
  • The json & FEATURES generation stage generation occur in this order:
  1. Raw Generation
  2. Lakes
  3. Local Modifications
  4. Underground Structures
  5. Surface Structures
  6. Strongholds
  7. Underground Ores
  8. Underground Decoration
  9. Fluid Springs
  10. Vegetal Decoration
  11. Top Layer Modification

precipitation

  • The precipitation in this biome. May be one of the following values: none, snow, rain

spawn_costs

  • Takes a list of entity registry ID's and have 2 arguments:
  1. energy_budget - Determines the total amount of entities that can spawn in a location, based on their current cost (e.g. a cost of 0.1 and a max total of 1 means at most ten entities can spawn in the given location).
  2. charge - Determines the cost per entity towards the maximum spawn cap.

spawners

  • A map of the mob category to a list of entity Spawner Data.

temperature

  • The temperature of the biome, typically in the range of -0.5 - 2.0.

configured_carver

  • The "little"(in comparison to 1.18's noise caves) aka legacy caves that generate in the world.

type

  • The carver object's ID that we'll be configuring with config

config

  • The configuration/settings for the carver object we're calling in type

configured_structure_feature

  • The structures that generate in the world