Archiviert
13
0

Fix issue with chests being erased - #322 Fixed

Dieser Commit ist enthalten in:
Aikar 2016-06-07 03:03:51 -04:00
Ursprung a9d8237509
Commit 3201cfe07a

Datei anzeigen

@ -1,4 +1,4 @@
From fc136a9094e3abb4812ca3cbf1128166136460f2 Mon Sep 17 00:00:00 2001 From 3201435271bb84379a61d81f65733d829bff08da Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sun, 1 May 2016 21:19:14 -0400 Date: Sun, 1 May 2016 21:19:14 -0400
Subject: [PATCH] LootTable API & Replenishable Lootables Feature Subject: [PATCH] LootTable API & Replenishable Lootables Feature
@ -540,10 +540,10 @@ index 19f9eb6..9162348 100644
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/net/minecraft/server/TileEntityLootable.java b/src/main/java/net/minecraft/server/TileEntityLootable.java 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 --- a/src/main/java/net/minecraft/server/TileEntityLootable.java
+++ b/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; package net.minecraft.server;
+import com.destroystokyo.paper.loottable.CraftLootableInventoryData; // Paper +import com.destroystokyo.paper.loottable.CraftLootableInventoryData; // Paper
@ -567,10 +567,10 @@ index 3dc58bf..5a494d2 100644
if (nbttagcompound.hasKeyOfType("LootTable", 8)) { if (nbttagcompound.hasKeyOfType("LootTable", 8)) {
this.m = new MinecraftKey(nbttagcompound.getString("LootTable")); this.m = new MinecraftKey(nbttagcompound.getString("LootTable"));
this.n = nbttagcompound.getLong("LootTableSeed"); this.n = nbttagcompound.getLong("LootTableSeed");
return true; - return true;
+ return false; // Paper - always load the items, table may still remain
} else { } else {
- return false; return false;
+ return true; // Paper - always load the items, table may still remain
} }
} }
@ -579,12 +579,13 @@ index 3dc58bf..5a494d2 100644
if (this.m != null) { if (this.m != null) {
nbttagcompound.setString("LootTable", this.m.toString()); nbttagcompound.setString("LootTable", this.m.toString());
if (this.n != 0L) { 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 { } else {
- return false; return false;
+ return true; // Paper - always save the items, table may still remain
} }
} }