mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 12:42:05 -07:00
Fix bug with lootable refresh not saving inventory if on
This commit is contained in:
@@ -453,6 +453,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
if (this.c != null) {
|
if (this.c != null) {
|
||||||
nbttagcompound.setString("LootTable", this.c.toString());
|
nbttagcompound.setString("LootTable", this.c.toString());
|
||||||
if (this.d != 0L) {
|
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
|
@@ -0,0 +0,0 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
|
||||||
protected void a(NBTTagCompound nbttagcompound) {
|
protected void a(NBTTagCompound nbttagcompound) {
|
||||||
super.a(nbttagcompound);
|
super.a(nbttagcompound);
|
||||||
@@ -461,6 +468,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
if (nbttagcompound.hasKeyOfType("LootTable", 8)) {
|
if (nbttagcompound.hasKeyOfType("LootTable", 8)) {
|
||||||
this.c = new MinecraftKey(nbttagcompound.getString("LootTable"));
|
this.c = new MinecraftKey(nbttagcompound.getString("LootTable"));
|
||||||
this.d = nbttagcompound.getLong("LootTableSeed");
|
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
|
@@ -0,0 +0,0 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -555,7 +567,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
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");
|
||||||
@@ -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) {
|
protected boolean e(NBTTagCompound nbttagcompound) {
|
||||||
@@ -564,6 +580,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
nbttagcompound.setString("LootTable", this.m.toString());
|
nbttagcompound.setString("LootTable", this.m.toString());
|
||||||
if (this.n != 0L) {
|
if (this.n != 0L) {
|
||||||
@@ -0,0 +0,0 @@ public abstract class TileEntityLootable extends TileEntityContainer implements
|
@@ -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) {
|
protected void d(@Nullable EntityHuman entityhuman) {
|
||||||
|
Reference in New Issue
Block a user