--- a/net/minecraft/world/level/storage/loot/LootDataType.java
+++ b/net/minecraft/world/level/storage/loot/LootDataType.java
@@ -9,6 +9,11 @@
 import net.minecraft.world.level.storage.loot.functions.LootItemFunctions;
 import net.minecraft.world.level.storage.loot.predicates.LootItemCondition;
 
+// CraftBukkit start
+import org.bukkit.craftbukkit.CraftLootTable;
+import org.bukkit.craftbukkit.util.CraftNamespacedKey;
+// CraftBukkit end
+
 public record LootDataType<T>(ResourceKey<IRegistry<T>> registryKey, Codec<T> codec, LootDataType.a<T> validator) {
 
     public static final LootDataType<LootItemCondition> PREDICATE = new LootDataType<>(Registries.PREDICATE, LootItemCondition.DIRECT_CODEC, createSimpleValidator());
@@ -32,6 +37,7 @@
     private static LootDataType.a<LootTable> createLootTableValidator() {
         return (lootcollector, resourcekey, loottable) -> {
             loottable.validate(lootcollector.setContextKeySet(loottable.getParamSet()).enterElement("{" + String.valueOf(resourcekey.registry()) + "/" + String.valueOf(resourcekey.location()) + "}", resourcekey));
+            loottable.craftLootTable = new CraftLootTable(CraftNamespacedKey.fromMinecraft(resourcekey.location()), loottable); // CraftBukkit
         };
     }
 
