13
0
geforkt von Mirrors/Paper

Fix bug with lootable refresh not saving inventory if on

Dieser Commit ist enthalten in:
Aikar 2016-06-06 19:56:51 -04:00
Ursprung bdc783f176
Commit 49c8b34653

Datei anzeigen

@ -453,6 +453,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
if (this.c != null) {
nbttagcompound.setString("LootTable", this.c.toString());
if (this.d != 0L) {
nbttagcompound.setLong("LootTableSeed", this.d);
}
- } else {
+ } if (true) { // Paper - Always save the items, Table may stick around
NBTTagList nbttaglist = new NBTTagList();
for (int i = 0; i < this.items.length; ++i) {
@@ -0,0 +0,0 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
protected void a(NBTTagCompound nbttagcompound) {
super.a(nbttagcompound);
@ -461,6 +468,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
if (nbttagcompound.hasKeyOfType("LootTable", 8)) {
this.c = new MinecraftKey(nbttagcompound.getString("LootTable"));
this.d = nbttagcompound.getLong("LootTableSeed");
- } else {
+ } if (true) { // Paper - always load the items, table may still remain
NBTTagList nbttaglist = nbttagcompound.getList("Items", 10);
for (int i = 0; i < nbttaglist.size(); ++i) {
@@ -0,0 +0,0 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
}
@ -555,7 +567,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
if (nbttagcompound.hasKeyOfType("LootTable", 8)) {
this.m = new MinecraftKey(nbttagcompound.getString("LootTable"));
this.n = nbttagcompound.getLong("LootTableSeed");
@@ -0,0 +0,0 @@ public abstract class TileEntityLootable extends TileEntityContainer implements
return true;
} else {
- return false;
+ return true; // Paper - always load the items, table may still remain
}
}
protected boolean e(NBTTagCompound nbttagcompound) {
@ -564,6 +580,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
nbttagcompound.setString("LootTable", this.m.toString());
if (this.n != 0L) {
@@ -0,0 +0,0 @@ public abstract class TileEntityLootable extends TileEntityContainer implements
return true;
} else {
- return false;
+ return true; // Paper - always save the items, table may still remain
}
}
protected void d(@Nullable EntityHuman entityhuman) {