From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 15 Jun 2016 22:06:57 -0400
Subject: [PATCH] Don't trigger Lootable Refresh for non player interaction


diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityLootable.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityLootable.java
index f0da819627035bed83561128a11059424d2b7e30..806a2e1a654bd917f635759725e6d7836b672f7d 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityLootable.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityLootable.java
@@ -69,6 +69,7 @@ public abstract class TileEntityLootable extends TileEntityContainer {
     }
 
     public void d(@Nullable EntityHuman entityhuman) {
+        if (entityhuman == null) return; // EMC
         if (this.lootableData.shouldReplenish(entityhuman) && this.world.getMinecraftServer() != null) { // Paper
             LootTable loottable = this.world.getMinecraftServer().getLootTableRegistry().getLootTable(this.lootTable);
 
