SPIGOT-6130: Fix API loot table generation with certain contexts

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2020-10-03 10:27:00 +10:00
parent e54c8b2f3c
commit 753bccda7c

View File

@ -75,6 +75,7 @@ public class CraftLootTable implements org.bukkit.loot.LootTable {
WorldServer handle = ((CraftWorld) loc.getWorld()).getHandle();
LootTableInfo.Builder builder = new LootTableInfo.Builder(handle);
builder.set(LootContextParameters.ORIGIN, new Vec3D(loc.getX(), loc.getY(), loc.getZ()));
if (getHandle() != LootTable.EMPTY) {
// builder.luck(context.getLuck());