Stop a mob from dropping original loot

Started by GalaxyManInSpace on

Topic category: Help with modding (Java Edition)

Last seen on 04:24, 24. Dec 2023
Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Stop a mob from dropping original loot

Hey, I've been trying to work on a mod that adds custom discs, and depending on what biome a skeleton shoots a creeper in, the creeper will drop a different disc, but I've run into the issue that the creeper drops both a vanilla disc and a custom disc. I'm trying to figure out the best way to stop the vanilla disc from dropping. Does any one have any ideas?

Last seen on 21:55, 20. Feb 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm not personally aware of…
Tue, 11/14/2023 - 16:39

I'm not personally aware of how to do biome specific loot tables, but I know it's possible, and you could download a datapack and look at how they format the json file to get an idea of how to do this. 

To override a vanilla loot table, you need to make sure it has the minecraft namespace, and the same name as the vanilla file. (You can use MCAsset to check out the default vanilla loot tables, and get their names.) You're probably aware of this and just using the wrong loot table name, since the creeper thing is kind of obscure; you don't want to use the default 'creeper' loot table, you want to use the 'creeperdropmusicdiscs' loot table, which is its own unique thing. (I'm pretty sure that's the correct registry name.)