diff --git a/src/main/java/choonster/testmod3/world/inventory/itemhandler/LootItemHandler.java b/src/main/java/choonster/testmod3/world/inventory/itemhandler/LootItemHandler.java index 706f8a11..e100bd0e 100644 --- a/src/main/java/choonster/testmod3/world/inventory/itemhandler/LootItemHandler.java +++ b/src/main/java/choonster/testmod3/world/inventory/itemhandler/LootItemHandler.java @@ -3,8 +3,10 @@ import choonster.testmod3.util.InventoryUtils; import com.google.common.base.Preconditions; import net.minecraft.core.NonNullList; +import net.minecraft.core.registries.Registries; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.Tag; +import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.entity.player.Player; @@ -34,12 +36,12 @@ public class LootItemHandler extends ItemStackHandler { protected final Supplier levelSupplier; /** - * The location of the {@link LootTable} to generate loot from. + * The key of the {@link LootTable} to generate loot from. *

* This will be {@code null} if no {@link LootTable} has been set or loot has already been generated. */ @Nullable - protected ResourceLocation lootTableLocation; + protected ResourceKey lootTable; /** * The random seed to use when generating loot. @@ -67,8 +69,8 @@ public LootItemHandler(final NonNullList stacks, final Supplier getLootTable() { + return lootTable; } }