How to have Vanilla Leaves drop mod items?

Started by PrinceAllart on Fri, 10/28/2022 - 01:43

Topic category: Help with modding (Java Edition)

Last seen on 14:29, 17. Jan 2023
Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to have Vanilla Leaves drop mod items?
Fri, 10/28/2022 - 01:43

Good evening,

I'm working on my first mod but have run into a snag I hadn't expected.

My mod is based on sticks and has a custom stick item for each vanilla tree (Except oak, which I'm leaving as the MC stick). I want birch sticks to fall from birch leaves, acacia from acacia leaves, etc.

Searching for tutorials, everyone I've seen uses entities and not blocks in their loot tables and procedures... and those who use blocks only use mod blocks and not vanilla blocks.

Can someone help steer me in the right direction with an example of how to drop a mod item to vanilla MC leaves block when broken? I'm not sure if the procedure I made is not written correctly or if I have not set up my loot table correctly. I can usually google or reverse engineer things to understand them but this one has me very stumped.

 

Thank you for any assistance. I appreciate it a lot.

Last seen on 05:06, 29. Jan 2023
Joined Mar 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
loot tables works too for…
Tue, 11/08/2022 - 02:46

loot tables works too for blocks.

to modify the drop for the leaves block set the settings of it to 
blocks/birch_leaves (the ID of the block have to do manually with all the leaves)
minecraft
blocks
and set the odds in the table

problems here are mainly wrong IDs

Last seen on 14:29, 17. Jan 2023
Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Thank you, Kyoukster. I have…
Wed, 11/09/2022 - 00:53

Thank you, Kyoukster. I have tried creating a loot table but do I need to have some kind of trigger for it to work? I have the loot table just like you said and it doesn't drop anything new. I took down over a dozen birch trees and no sticks or leaves.

 

I have the leaves in there because they're needed for a recipe.