Skip to content

Custom Shipwreck Wood Types

Apollo edited this page Oct 27, 2024 · 2 revisions

This guide will show you how to add custom wood type palettes to Shipwrecks using Lithostitched. In the given example, we'll add a shipwreck palette that uses dark oak and mangrove.

The only prerequisites for understanding this guide is understanding how datapacks are structured.

Please note that for this guide, 'datapack' both refers to standalone datapacks and built-in datapacks in mods. When you put a data file in a mod's resources file, the game reads from it like it is a datapack.

1/2 - Processor Lists

Structure processors are used to apply changes to a structure template after it is placed. They can be used to age blocks, change dirt paths to planks if in water, and more. Normally you cannot apply processors to shipwrecks, but Lithostitched adds a processor list tag to make it possible.

To add a custom shipwreck palette, we'll need to make a custom processor list to apply it. In your datapack, create a json file under the <namespace>/worldgen/processor_list folder. In the example datapack, it is at .../processor_list/dark_oak_and_mangrove.json, but it can be named whatever you want and in as many/as few subfolders as you want.

Open the file in a text editor and paste this in:

{
  "processors": [
    {
      "processor_type": "lithostitched:block_swap",
      "blocks": {
        "minecraft:oak_log": "minecraft:primary_log",
        "minecraft:oak_planks": "minecraft:primary_planks",
        "minecraft:oak_stairs": "minecraft:primary_stairs",
        "minecraft:oak_slab": "minecraft:primary_slab",
        "minecraft:oak_fence": "minecraft:primary_fence",
        "minecraft:oak_door": "minecraft:primary_door",
        "minecraft:oak_trapdoor": "minecraft:primary_trapdoor",
        "minecraft:spruce_planks": "minecraft:secondary_planks",
        "minecraft:spruce_stairs": "minecraft:secondary_stairs",
        "minecraft:spruce_slab": "minecraft:secondary_slab",
        "minecraft:spruce_fence": "minecraft:secondary_fence"
      }
    }
  ]
}

In this processor list is a single processor: Lithostitched's block_swap processor, which is a direct block swap preserving block states. Change minecraft:primary and minecraft:secondary to the wood types you want for the shipwreck.

For example, if you want to have spruce as the primary wood type and Biomes O Plenty's fir as the secondary wood type, change minecraft:primary to minecraft:spruce and minecraft:secondary to biomesoplenty:fir.

2/2 - Lithostitched

Now that we have a processor list that applies the wood type palette to the shipwreck, we can put the processor list in the processor list tag for shipwreck palettes.

Create a json file in the data/lithostitched/tags/worldgen/processor_list folder named shipwreck_palettes.json. Open the file in a text editor and paste this in:

{
  "values": [
    "<your processor list id>"
  ]
}

Change the placeholder value to the id of your processor list file. In the example datapack, since the processor list file is at example/worldgen/processor_list/dark_oak_and_mangrove.json, the location of the processor list file is "example:dark_oak_and_mangrove".

If you've done everything correctly, you're done! Open a new world and teleport to/spawn in a few shipwrecks and you should see your custom wood type palette in the mix. If you don't see it, double check each step in the guide and reference the example datapack to see if you made a mistake somewhere.