The LootTableLoadEvent appears to be missing some API changes that were made around other loot-table-adjacent things in 1.20.5; in particular:
getName() returns a ResourceLocation and there's no method that returns the New Hotness ResourceKey<LootTable> used elsewhere.
This is mostly cosmetic, but it's an inconsistency with other API changes,
There doesn't appear to be any way to access a HolderLookup.Provider from this event, which is required to access various registries -- for example, if you want to add an enchantment condition check you need some way to access the enchantment registry.
Since this event is fired during deserialization, there is not yet any server OR client, so CommonHooks.resolveLookup always fails.
The codec (or rather the RegistryOps) should have access to the registry lookups, but it needs to be passed into the event.
Minecraft Version: 1.21.1
NeoForge Version: 21.1.9
Description of issue:
The
LootTableLoadEvent
appears to be missing some API changes that were made around other loot-table-adjacent things in 1.20.5; in particular:getName()
returns aResourceLocation
and there's no method that returns the New HotnessResourceKey<LootTable>
used elsewhere.HolderLookup.Provider
from this event, which is required to access various registries -- for example, if you want to add an enchantment condition check you need some way to access the enchantment registry.CommonHooks.resolveLookup
always fails.RegistryOps
) should have access to the registry lookups, but it needs to be passed into the event.