mirror of
https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
synced 2025-08-05 16:49:30 +00:00
SPIGOT-7014: getLootTable API should not persistently update loot table
This commit is contained in:
parent
7fdd7941f6
commit
2ac7fa7af6
1 changed files with 2 additions and 5 deletions
|
@ -1,6 +1,7 @@
|
|||
package org.bukkit.craftbukkit.entity;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import net.minecraft.resources.MinecraftKey;
|
||||
import net.minecraft.world.entity.EntityInsentient;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.NamespacedKey;
|
||||
|
@ -61,11 +62,7 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob {
|
|||
|
||||
@Override
|
||||
public LootTable getLootTable() {
|
||||
if (getHandle().lootTable == null) {
|
||||
getHandle().lootTable = getHandle().getDefaultLootTable();
|
||||
}
|
||||
|
||||
NamespacedKey key = CraftNamespacedKey.fromMinecraft(getHandle().lootTable);
|
||||
NamespacedKey key = CraftNamespacedKey.fromMinecraft(getHandle().getLootTable());
|
||||
return Bukkit.getLootTable(key);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue