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

Started by GregSmith on

Topic category: Help with Minecraft modding (Java Edition)

Joined Sep 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to add item to a block loot table which will drop if the tool has a custom enchantment?

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: