mojira.dev
MC-154626

Composter loot table does not affect bone meal drops.

Let me preface this by saying I have very little experience with loot tables and I'm not really sure how they work. I have, however, made a few data packs, so as far as I know I'm doing it correctly.

I wanted to make a data pack that changed composters to give dirt instead of bone meal. I extracted the vanilla loot table for composters, and I changed the line that gives bone meal to give dirt instead. No other changes. However, it still produces bone meal.

Just to be sure, I changed the "explosion_decay" drop to a diamond block. I then blew up a composter with TNT, and sure enough, it dropped a diamond block. That makes me positive I've at least made the data pack correctly.

Linked issues

Attachments

Comments 7

In Minecraft 1.15.2, this is still an issue. How can it be that this is still unassigned?

This issues still persists in 20w10a.

 

I wonder where mojang draws the line at bug reports involving hardcoded stuff.

I've been working on this as well, and by no means an expert either. Having said that, best I can determine is that the block loot_table is for when the block is broken, not for when it is used. So in this case you are setting what happens when you break the composter. I have tested and confirmed this to work, under the scenario of breaking the composter. I think this is expected behaviour, and not a bug. To change teh behaviour of the composter when used, requires a bit more work than changing the loot_table.

Cannot reproduce. Not even in 1.15.2. It's most likely your datapack/loot table is broken.

It's dropping dirt as expected with this:

{
  "type": "minecraft:block",
  "pools": [
    {
      "rolls": 1.0,
      "entries": [
        {
          "type": "minecraft:item",
          "functions": [
            {
              "function": "minecraft:explosion_decay"
            }
          ],
          "name": "minecraft:composter"
        }
      ]
    },
    {
      "rolls": 1.0,
      "entries": [
        {
          "type": "minecraft:item",
          "name": "minecraft:dirt"
        }
      ],
      "conditions": [
        {
          "condition": "minecraft:block_state_property",
          "block": "minecraft:composter",
          "properties": {
            "level": "8"
          }
        }
      ]
    }
  ]
}

I just copy pasted the code as it is here, and still only get bone_meal when using the composter [using 1.15.2]. It will drop dirt when broken while full, which was previously mentioned. So I guess the question is, should the loot_table apply only when the composter is broken, or also when it is used? [attached is the test datapack I used in a clean world]

I'm fine with this as "expected behaviour" if it is  only for  when it is broken, this is not inconstant with drops for other blocks. In which case I'd like to request/suggest that composting be implemented the same as fishing where it can have it's own set of tables/actions under the loot_tables/gameplay tree, as this would bring it in-line with other components of the game.

One question:

Yes it's true, if the composter is full and you brake it, it'll drop the Item wihich in written in the Datapck, but if you rightclick on it, it won't drop the item. So my Question is how to change the item wich drops when you use the composter?

Megabobster

(Unassigned)

Community Consensus

Loot tables

Minecraft 1.14.3 Pre-Release 3, 1.15.2

Retrieved