CraftTweaker

CraftTweaker

151M Downloads

[1.15.2] Global Loot Modifiers

Darkhax opened this issue ยท 3 comments

commented

Feature request description
Forge has deprecated the events for block/entity loot in favor of their global loot modifier system. I would like to see support for the new system so that some of the old drop modification functionality can be restored.

Forge's global loot modifiers are a map of ResourceLocation to IGlobalLootModifier stored in the LootModifierManager. Entries are normally added to this map using the data pack system. I would like to specifically do the following using a script.

  1. Clear all global modifiers
  2. Remove a specific modifier by resource location
  3. Get the keys for all modifiers.
  4. Add a new modifier using a ZS function.

Feature request reason
Data packs are extremely limited in how they work. You can only add new entries or remove all entries loaded before your datapack gets loaded. Forge also doesn't provide any built in modifier types so standard Forge feature is completely useless for modpacks as currently implemented.

Feature request dependencies
This will require CraftTweaker to have definitions for IGlobalLootModifier and ILootCondition. Things like LootTable, LootPool, LootEntry, and ILootFunction are not part of the global modifiers.

commented

For what version of Forge/CrT is this request?

commented

1.15.2, this forge feature isn't available in other versions yet.

commented

Could this be closed since #1092 has been merged?