2 Creating Datapacks
Orion edited this page 2025-11-02 08:27:44 +00:00

Datapacks

Datapacks are special folders (.zip or not) that change data in the game, if you already know how datapacks work and the general base structure and how to implement it, feel free to skip ahead.

A datapack is a folder (or a compressed zip folder, either works) that requires a specific folder structure to work and have effect, so let's start with the base.

In your datapack folder (feel free to name it as you wish) it should have one file and a folder:

pack.mcmeta

This defines the base data of your datapack, in this case we'll just be using a simple description and pack_format, here's a simple base you can copy:

{
  "pack": {
    "description": "An amazing datapack for CCS!",
    "pack_format": 15
  }
}

The pack_format of 15 indicates that this datapack is for the version range of 1.20 - 1.20.1, need to find your pack format version? This should help you.

data (folder)

This is where data starts becoming effective, everything that you put in as data shall be in here, from now on the next steps will have header descriptions like: data/create_cold_sweat/create_cold_sweat/fluid_temperatures this is the directory, all of these are a folder you should create if it doesn't exist and you want to configure said feature.

Now on with the actual data configuration,

Fluids

data/create_cold_sweat/create_cold_sweat/fluid_temperatures

This will allow you to alter the temperatures of the fluids you interact with, whether in game or in a container, to start configuring you'll have to make a .json file of any name, in this case I'll copy over the name fluid_temperatures.json, the full directory to this file should look like this now: data/create_cold_sweat/create_cold_sweat/fluid_temperatures/fluid_temperatures.json

Contents:

{
  "units": "c",
  "values": {
    "minecraft:water": -20,
    "minecraft:lava": 8
  }
}

In my case I altered the fluid temperatures of Minecraft's default water and lava to -20C and 8C respectively. "units": "c": the unit of measurement used in this file, can either be c for celsius or f for fahrenheit. "values": dictionary: a dictionary of values that'll alter fluid temperatures ("fluidId": temperature): this is an entry for the dictionary, you'll plug in a fluidId (such as "minecraft:water") and a desired temperature (in my case -20).

Make sure you have a fluidId and not anything else, to find the fluidId try checking JEI with advanced tooltips on this might help you, wikis aswell and looking at your desired fluid with f3 can show the id for it.

Block Tags

data/create_cold_sweat/tags/blocks

In this the name of your files will matter so make sure to name them carefully.

The mod as of writing this has the following 5 tags, each of which can be created as a .json file to add and/or remove blocks tagged with this.

  1. blaze_burner_block
  2. fluid_container_block
  3. fluid_tank_block
  4. pipe_block
  5. steam_engine_block

Here's an example of how these files are formatted:

blaze_burner_block.json

{
  "replace": true,
  "values": [
    "create:blaze_burner",
    "create:lit_blaze_burner"
  ]
}

"replace": boolean: Whether this datapack adds or alters the base tags, if its true, any blocks that were previously affected by default by the mod will NOT be affected if not stated in the file, if false (or not present), the following values will only add to the tag. "values": array: A list of block ids that shall be tagged.

WARNING

These Tag's (except fluid_containers*) work under the presumption that the tagged block internally extends the create base block internally

*fluid_containers work under the presumption that the blocks in it actually can hold fluids and that capability is exposed to the world.

Sidenote

These datapack values won't crash your game if done wrong and should be pretty fail resistant so long as the json structure as a whole is up to standard, missmatching a tag won't break anything, just might clutter up your console a bit.

Here's a .zip you can download as an example of a CCS datapack and also shows the default values of the mod

And here's a folder to the Example datapack if you want to read the files without downloading