How do you get drops from a block?

Started by bubuwubu on

Topic category: Help with Minecraft modding (Java Edition)

Joined Feb 2026
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do you get drops from a block?

Hello, I'm asking bacause I want to make an item in minecraft, which, after breaking a mature crop block, would transfer its drop to the player's inventory and automaticaly replant the crop. I want it to work on any crop, modded or vanilla.

I tried using loot tables to do this, however I only got the drop from the immature crop (that being seeds). So, is there any way to get a block's drops without using loot tables? Something like the #getDrop() function maybe? I'm open to any solution, even if it requires manually editing code.

Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I unfortunately don't think…
Sat, 02/21/2026 - 19:42

I unfortunately don't think there is any way to get the contents of a block's loot table through procedure's in Mcreator without custom coding. I think that would be a neat feature, but because there aren't lists in mcreator I doubt it would really make sense, since a loot table can have hundreds of different items within it.

For example a crop like wheat drops both seeds and wheat when its broken, vs a carrot which just simply drops multiple of itself. There wouldn't be an easy way for it to automatically know which thing to plant, minecraft just doesn't have the infrastructure for that.

Here's my idea for a solution. Have the item choose from a seed/plantable crop in your inventory or offhand and have it plant that when you break the crop.