How to add item to a block loot table which will drop if the tool has a custom enchantment?

Started by GregSmith on Fri, 09/30/2022 - 21:11

Topic category: Help with modding (Java Edition)

Last seen on 17:46, 7. Nov 2022
Joined Sep 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to add item to a block loot table which will drop if the tool has a custom enchantment?
Fri, 09/30/2022 - 21:11

I added a "smelting" enchantment to my mining mod that adds several ores underground, and I want to use the enchantment to make it so those ores will drop their smelted counterparts rather than their raw ones. I use loot tables for their drops to add compatibility to the Fortune and Silk Touch enchantments.

Thanks in advance!

Example of one of my loot tables: