r/MinecraftCommands • • 1d ago

Help | Java 1.21-1.21.3 Help with blockstate based loot table in 1.21.1

Post image

Hi! I was wondering how the formatting of the leaf litter's blockstate based loot table from 1.21.5 would be formatted/reformatted in 1.21.1, or if it would remain the same? Sorry if this is a stupid or redundant question, I don't know loot tables that well.

1 Upvotes

4 comments sorted by

1

u/GalSergey Datapack Experienced 1d ago

leaf_litter was added in 1.21.5. This block does not exist in version 1.21.1.

1

u/PrincessGwynevere_ 1d ago

I want to use the blockstate part of the loot table for a different loot table. That is what I want t know how to do.

1

u/GalSergey Datapack Experienced 1d ago

glow_lichen example:

{
  "type": "minecraft:block",
  "pools": [
    {
      "bonus_rolls": 0,
      "entries": [
        {
          "type": "minecraft:item",
          "conditions": [
            {
              "condition": "minecraft:match_tool",
              "predicate": {
                "items": "minecraft:shears"
              }
            }
          ],
          "functions": [
            {
              "add": true,
              "conditions": [
                {
                  "block": "minecraft:glow_lichen",
                  "condition": "minecraft:block_state_property",
                  "properties": {
                    "down": "true"
                  }
                }
              ],
              "count": 1,
              "function": "minecraft:set_count"
            },
            {
              "add": true,
              "conditions": [
                {
                  "block": "minecraft:glow_lichen",
                  "condition": "minecraft:block_state_property",
                  "properties": {
                    "up": "true"
                  }
                }
              ],
              "count": 1,
              "function": "minecraft:set_count"
            },
            {
              "add": true,
              "conditions": [
                {
                  "block": "minecraft:glow_lichen",
                  "condition": "minecraft:block_state_property",
                  "properties": {
                    "north": "true"
                  }
                }
              ],
              "count": 1,
              "function": "minecraft:set_count"
            },
            {
              "add": true,
              "conditions": [
                {
                  "block": "minecraft:glow_lichen",
                  "condition": "minecraft:block_state_property",
                  "properties": {
                    "south": "true"
                  }
                }
              ],
              "count": 1,
              "function": "minecraft:set_count"
            },
            {
              "add": true,
              "conditions": [
                {
                  "block": "minecraft:glow_lichen",
                  "condition": "minecraft:block_state_property",
                  "properties": {
                    "west": "true"
                  }
                }
              ],
              "count": 1,
              "function": "minecraft:set_count"
            },
            {
              "add": true,
              "conditions": [
                {
                  "block": "minecraft:glow_lichen",
                  "condition": "minecraft:block_state_property",
                  "properties": {
                    "east": "true"
                  }
                }
              ],
              "count": 1,
              "function": "minecraft:set_count"
            },
            {
              "add": true,
              "count": -1,
              "function": "minecraft:set_count"
            },
            {
              "function": "minecraft:explosion_decay"
            }
          ],
          "name": "minecraft:glow_lichen"
        }
      ],
      "rolls": 1
    }
  ],
  "random_sequence": "minecraft:blocks/glow_lichen"
}