Skip to content

Datapack Recipes

cech12 edited this page Mar 21, 2026 · 17 revisions

All buckets, that are generated with this mod, can be used as ingredient in data pack recipes.

Filled Bucket as ingredient

Fluid bucket

If you need to add a recipe with fluid buckets, you should use the ingredient type (for Fabric fabric:type) bucketlib:fluid. You can define a fluid directly by using the fluid field or you can define it with a fluid tag by using the tag field.

Hint: Do not use this for milk. (see the next chapter)

{
  "type": "minecraft:crafting_shapeless",
  "ingredients": [
    {
      "type": "bucketlib:fluid",
      "fluid": "minecraft:water"
    }
  ],
  "result": {
    "item": "minecraft:grass"
  }
}
{
  "type": "minecraft:crafting_shapeless",
  "ingredients": [
    {
      "type": "bucketlib:fluid",
      "tag": "minecraft:water"
    }
  ],
  "result": {
    "item": "minecraft:grass"
  }
}

Milk bucket

If you need to add a recipe with milk buckets, you should use the ingredient type (for Fabric fabric:type) bucketlib:milk, to cover all special cases for milk.

{
  "type": "minecraft:crafting_shaped",
  "category": "misc",
  "pattern": [
    "FFF",
    "BEB",
    "CCC"
  ],
  "key": {
    "F": {
      "type": "bucketlib:milk"
    },
    "B": {
      "item": "minecraft:sugar"
    },
    "C": {
      "item": "minecraft:wheat"
    },
    "E": {
      "tag": "forge:eggs"
    }
  },
  "result": {
    "item": "minecraft:cake"
  }
}

Entity bucket

since 1.20.1-2.3.2.0 and 1.20.4-3.1.2.0

If you need to add a recipe with entity buckets, you should use the ingredient type (for Fabric fabric:type) bucketlib:entity. You can define an entity directly by using the entity field or you can define it with an entity tag by using the tag field.

{
  "type": "minecraft:crafting_shapeless",
  "category": "misc",
  "ingredients": [
    {
      "type": "bucketlib:entity",
      "entity": "minecraft:salmon"
    }
  ],
  "result": {
    "item": "minecraft:salmon"
  }
}
{
  "type": "minecraft:crafting_shapeless",
  "category": "misc",
  "ingredients": [
    {
      "type": "bucketlib:entity",
      "tag": "your_datapack:your_entity_tag"
    }
  ],
  "result": {
    "item": "minecraft:salmon"
  }
}

Block bucket

since 1.20.1-2.3.2.0 and 1.20.4-3.1.2.0

If you need to add a recipe with block buckets, you should use the ingredient type (for Fabric fabric:type) bucketlib:block. You can define a block directly by using the block field or you can define it with a block tag by using the tag field.

{
  "type": "minecraft:crafting_shapeless",
  "category": "misc",
  "ingredients": [
    {
      "type": "bucketlib:block",
      "entity": "minecraft:powder_snow"
    }
  ],
  "result": {
    "item": "minecraft:snowball"
  }
}
{
  "type": "minecraft:crafting_shapeless",
  "category": "misc",
  "ingredients": [
    {
      "type": "bucketlib:block",
      "tag": "your_datapack:your_block_tag"
    }
  ],
  "result": {
    "item": "minecraft:snowball"
  }
}

Empty Buckets as ingredient

since 1.20.1-2.3.1.0 and 1.20.4-3.1.1.0

All Empty Buckets

You can define an ingredient which uses all empty buckets which are generated by this library mod plus the vanilla bucket:

{
  "type": "minecraft:crafting_shapeless",
  "ingredients": [
    {
      "type": "bucketlib:empty"
    }
  ],
  "result": {
    "item": "minecraft:iron_nugget"
  }
}

It is important that the type (for Fabric fabric:type) is bucketlib:empty.

Specific Empty Bucket

You can define an ingredient which uses a specific empty bucket which is generated by this library mod:

{
  "type": "minecraft:crafting_shapeless",
  "ingredients": [
    {
      "type": "bucketlib:empty",
      "item": "ceramicbucket:ceramic_bucket"
    }
  ],
  "result": {
    "item": "minecraft:brick"
  }
}

It is important that the type (for Fabric fabric:type) is bucketlib:empty. The item must be a bucket which is generated by this library mod.

Tagged Empty Buckets

You can define an ingredient which uses an item tag for specific empty buckets which are generated by this library mod:

{
  "type": "minecraft:crafting_shapeless",
  "ingredients": [
    {
      "type": "bucketlib:empty",
      "tag": "your_datapack:your_bucket_tag"
    }
  ],
  "result": {
    "item": "minecraft:dirt"
  }
}

It is important that the type (for Fabric fabric:type) is bucketlib:empty. The tag must be a defined item tag that contains buckets which are generated by this library mod. If you specify also an item in the ingredient, the tag is ignored.

Filling Recipes

since 1.20.1-2.3.3.0 and 1.20.4-3.1.3.0

This mod adds the possibility to add recipes which fill an empty bucket from the defined ingredients. The properties such as color or durability are retained. Both shaped ("bucketlib:bucket_filling_shaped") and shapeless ("bucketlib:bucket_filling_shapeless") recipes are possible. Empty buckets, which are generated by this mod, can be filled with fluids, milk, blocks and entities (with the fitting fluid).

Exactly one ingredient of such a recipe should be a described specific empty bucket ingredient. Please use a specific bucket "item" which is generated by this library mod to avoid issues. (vanilla buckets are not working) ("all" empty buckets and multiple tagged empty buckets have issues with JEI, because only one result can be shown/linked)

Fluid Filling

{
  "type": "bucketlib:bucket_filling_shaped",
  "category": "misc",
  "pattern": [
    "BS"
  ],
  "key": {
    "B": {
      "type": "bucketlib:empty",
      "item": "ceramicbucket:ceramic_bucket"
    },
    "S" : {
      "item": "minecraft:blue_dye"
    }
  },
  "filling_type": "fluid",
  "fluid": "minecraft:water"
}

This shaped recipe fills an empty bucket, which is generated by this mod, with water by adding blue dye next to it.

Milk Filling

{
  "type": "bucketlib:bucket_filling_shapeless",
  "category": "misc",
  "ingredients": [
    {
      "type": "bucketlib:empty",
      "item": "ceramicbucket:ceramic_bucket"
    },
    {
      "item": "minecraft:bone_meal"
    }
  ],
  "filling_type": "milk"
}

This shapeless recipe fills an empty bucket, which is generated by this mod, with milk by adding bone meal to it.

Block Filling

{
  "type": "bucketlib:bucket_filling_shaped",
  "category": "misc",
  "pattern": [
    "BS"
  ],
  "key": {
    "B": {
      "type": "bucketlib:empty",
      "item": "ceramicbucket:ceramic_bucket"
    },
    "S" : {
      "item": "minecraft:snowball"
    }
  },
  "filling_type": "block",
  "block": "minecraft:powder_snow"
}

This shaped recipe fills an empty bucket, which is generated by this mod, with powder_snow by adding a snowball next to it.

Entity Filling

{
  "type": "bucketlib:bucket_filling_shapeless",
  "category": "misc",
  "ingredients": [
    {
      "type": "bucketlib:empty",
      "item": "ceramicbucket:ceramic_bucket"
    },
    {
      "item": "minecraft:salmon"
    }
  ],
  "filling_type": "entity",
  "entity": "minecraft:salmon",
  "fluid": "minecraft:water"
}

This shapeless recipe fills an empty bucket, which is generated by this mod, with water & salmon by adding a raw salmon next to it.

Examples

Here you can find some example recipes, which are already included in this library mod:

https://github.com/cech12/BucketLib/tree/1.20/common/src/main/resources/data/bucketlib/recipes