# Setup

### Setting Up Loot Tables:

To define the drops for a specific block, you need to create loot table files. Here's an example of setting up a loot table for the "coreextensions:test\_block123" block:

1. Create the directory:

Create the following directory structure under your namespace:

```
data\命名空间\loot_tables\blocks
```

For example, if your namespace is "coreextensions", create the directory:

```
data\coreextensions\loot_tables\blocks
```

2. Create the loot table file:

Create a file named "test\_block123.json" in the directory you just created:

```
data\coreextensions\loot_tables\blocks\test_block123.json
```

3. Open the "test\_block123.json" file and configure it as follows:

```json
{
  "type": "minecraft:block",
  "pools": [
    {
      "rolls": 1,
      "bonus_rolls": 0,
      "entries": [
        {
          "type": "minecraft:item",
          "name": "coreextensions:test_block123"
        }
      ],
      "conditions": [
        {
          "condition": "minecraft:survives_explosion"
        }
      ]
    }
  ],
  "random_sequence": "coreextensions:test_block123"
}
```

Make sure to replace "coreextensions:test\_block123" with the correct block ID that you want to set up the loot table for.

This setup defines that the "coreextensions:test\_block123" block will drop itself when broken, and it specifies the conditions for the drops.

You can use the same tutorial to set up loot tables for other blocks. Just replace "coreextensions:test\_block123" with the desired block ID in the loot table file.
