Modifying Frog Biomes - andrew0030/SwampierSwamps GitHub Wiki

Overview

This guide explains how to modify the biomes in which frogs can be obtained by editing the modโ€™s biome tags via a data pack.


๐Ÿ“‚ Creating a Data Pack

To modify frog biomes, you need to create a data pack that modifies the modโ€™s default biome tags. Below is a simple guide to setting one up.

1๏ธโƒฃ Folder Structure

Your data pack should follow this structure:

Valid Structure โœ”๏ธ Invalid Structure โŒ
๐Ÿ“ฆ example.zip
โ”œโ”€ ๐Ÿ“‚ data
โ””โ”€ ๐Ÿ“„ pack.mcmeta
๐Ÿ“ฆ example.zip
โ””โ”€ ๐Ÿ“‚ example
      โ”œโ”€ ๐Ÿ“‚ data
      โ””โ”€ ๐Ÿ“„ pack.mcmeta

โ— Important: When zipping the pack, ensure the data folder and pack.mcmeta file are at the root level. If they are inside another folder, Minecraft won't recognize them.


2๏ธโƒฃ Setting Up pack.mcmeta

Inside your data pack, create a file called pack.mcmeta with the following contents:

{
  "pack": {
    "pack_format": 15,
    "description": "Custom Frog Biomes"
  }
}

Explanation:

  • "pack_format" โ†’ A number used to describe what game versions a data pack is compatible with.
  • "description" โ†’ A simple description for your data pack.

๐Ÿ“ Note: The pack_format number depends on your Minecraft version. Check the official Minecraft Wiki for the correct value.


๐Ÿธ Editing the Frog Biome Tags

Each frog variant has its own biome tag file. These are located in:

data/swampier_swamps/tags/worldgen/biome/frog_variants/

๐Ÿ“ Note: One can either open the mod's .jar to find the files, or look at them on github โคด๏ธ

For example, the White Frog biomes are defined in:

data/swampier_swamps/tags/worldgen/biome/frog_variants/white_frog_biomes.json

To modify this, create a file at the same path inside your data pack with this format:

{
  "replace": false,
  "values": []
}

Now in order to add more biomes to the list you simply add them inside values:

{
  "replace": false,
  "values": [
    "minecraft:jungle",
    "examplemod:special_biome",
    "#examplemod:biomes_tag"
  ]
}

Explanation:

  • "replace": false โ†’ Keeps existing biomes while adding new ones.
  • "values" โ†’ List of biomes or tags to include.
  • "minecraft:jungle" โ†’ Adds the "Jungle" vanilla biome.
  • "examplemod:special_biome" โ†’ Adds the "Special Biome" modded biome, added by "examplemod".
  • "#examplemod:example_tag" โ†’ Adds all biomes inside the examplemod:example_tag tag.

๐Ÿ’ก Tip: You can also remove biomes by setting "replace": true, which replaces the default list with your own.

โ— Important: In the example above we added the "Jungle" biome to the White Frog without using "replace": true, this may cause issues if you don't modify subsequent frog tag files. So if your goal is to modify the existing biomes, please read Frog Variant System, to understand the limitations of the system.


๐ŸŽฎ Targeting Minecraft vs. Mod Biomes

  • Vanilla Minecraft biomes use minecraft:biome_id.
  • Modded biomes use modid:biome_id (e.g., examplemod:special_biome).
  • Biome tags use #modid:tag_id to include multiple biomes at once.

โ— Important: For tags you have to add the #.


๐Ÿ“ฆ Installing Your Datapack

Once you've created your datapack:

  1. Place the zip file inside saves/<your-world>/datapacks/ for a specific world.
  2. Run /reload in-game or restart your world to apply the changes.
  3. Or, select the zip file when creating a new world.

๐Ÿ“– More on Data Packs

Data packs can do much more than modify biomes! Learn more at:

โš ๏ธ **GitHub.com Fallback** โš ๏ธ