aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAikar <[email protected]>2016-06-07 03:03:51 -0400
committerAikar <[email protected]>2016-06-07 03:03:51 -0400
commit3201cfe07a30f6202ec8f3f18a4ffeeb4debb7e5 (patch)
tree60f83a2e3b5e6341eb28fa42563de1486a6cb958
parenta9d82375090f9a52367235e3447e48702fba2985 (diff)
downloadPaper-3201cfe07a30f6202ec8f3f18a4ffeeb4debb7e5.tar.gz
Paper-3201cfe07a30f6202ec8f3f18a4ffeeb4debb7e5.zip
Fix issue with chests being erased - #322 Fixed
-rw-r--r--Spigot-Server-Patches/0147-LootTable-API-Replenishable-Lootables-Feature.patch21
1 files changed, 11 insertions, 10 deletions
diff --git a/Spigot-Server-Patches/0147-LootTable-API-Replenishable-Lootables-Feature.patch b/Spigot-Server-Patches/0147-LootTable-API-Replenishable-Lootables-Feature.patch
index 327424b9a8..d78773e421 100644
--- a/Spigot-Server-Patches/0147-LootTable-API-Replenishable-Lootables-Feature.patch
+++ b/Spigot-Server-Patches/0147-LootTable-API-Replenishable-Lootables-Feature.patch
@@ -1,4 +1,4 @@
-From fc136a9094e3abb4812ca3cbf1128166136460f2 Mon Sep 17 00:00:00 2001
+From 3201435271bb84379a61d81f65733d829bff08da Mon Sep 17 00:00:00 2001
From: Aikar <[email protected]>
Date: Sun, 1 May 2016 21:19:14 -0400
Subject: [PATCH] LootTable API & Replenishable Lootables Feature
@@ -540,10 +540,10 @@ index 19f9eb6..9162348 100644
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/server/TileEntityLootable.java b/src/main/java/net/minecraft/server/TileEntityLootable.java
-index 3dc58bf..5a494d2 100644
+index 3dc58bf..d36aed4 100644
--- a/src/main/java/net/minecraft/server/TileEntityLootable.java
+++ b/src/main/java/net/minecraft/server/TileEntityLootable.java
-@@ -1,26 +1,32 @@
+@@ -1,43 +1,49 @@
package net.minecraft.server;
+import com.destroystokyo.paper.loottable.CraftLootableInventoryData; // Paper
@@ -567,10 +567,10 @@ index 3dc58bf..5a494d2 100644
if (nbttagcompound.hasKeyOfType("LootTable", 8)) {
this.m = new MinecraftKey(nbttagcompound.getString("LootTable"));
this.n = nbttagcompound.getLong("LootTableSeed");
- return true;
+- return true;
++ return false; // Paper - always load the items, table may still remain
} else {
-- return false;
-+ return true; // Paper - always load the items, table may still remain
+ return false;
}
}
@@ -579,12 +579,13 @@ index 3dc58bf..5a494d2 100644
if (this.m != null) {
nbttagcompound.setString("LootTable", this.m.toString());
if (this.n != 0L) {
-@@ -29,15 +35,15 @@ public abstract class TileEntityLootable extends TileEntityContainer implements
+ nbttagcompound.setLong("LootTableSeed", this.n);
+ }
- return true;
+- return true;
++ return false; // Paper - always save the items, table may still remain
} else {
-- return false;
-+ return true; // Paper - always save the items, table may still remain
+ return false;
}
}