From ef6ad05c2ecc3cefbce698f9eb548a9d6d8c5eef Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Sun, 21 May 2017 23:25:43 +1000 Subject: [PATCH] Fixes #473 (chest issue) --- build.gradle | 2 +- .../java/com/boydti/fawe/bukkit/v1_10/BukkitChunk_1_10.java | 4 ++++ .../java/com/boydti/fawe/bukkit/v1_11/BukkitChunk_1_11.java | 4 ++++ .../java/com/boydti/fawe/bukkit/v1_12/BukkitChunk_1_12.java | 4 ++++ .../java/com/boydti/fawe/bukkit/v1_7/BukkitChunk_1_7.java | 4 ++++ .../java/com/boydti/fawe/bukkit/v1_8/BukkitChunk_1_8.java | 4 ++++ .../java/com/boydti/fawe/bukkit/v1_9/BukkitChunk_1_9.java | 4 ++++ 7 files changed, 25 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 9f0b2eed..14218e4a 100644 --- a/build.gradle +++ b/build.gradle @@ -28,7 +28,7 @@ ext { date = git.head().date.format("yy.MM.dd") revision = "-${git.head().abbreviatedId}" parents = git.head().parentIds; - index = -92; // Offset to mach CI + index = -94; // Offset to mach CI int major, minor, patch; major = minor = patch = 0; for (;parents != null && !parents.isEmpty();index++) { diff --git a/bukkit/src/main/java/com/boydti/fawe/bukkit/v1_10/BukkitChunk_1_10.java b/bukkit/src/main/java/com/boydti/fawe/bukkit/v1_10/BukkitChunk_1_10.java index 8b0349ce..7a96d9da 100644 --- a/bukkit/src/main/java/com/boydti/fawe/bukkit/v1_10/BukkitChunk_1_10.java +++ b/bukkit/src/main/java/com/boydti/fawe/bukkit/v1_10/BukkitChunk_1_10.java @@ -37,6 +37,7 @@ import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.EntityTypes; import net.minecraft.server.v1_10_R1.IBlockData; import net.minecraft.server.v1_10_R1.NBTTagCompound; +import net.minecraft.server.v1_10_R1.NBTTagInt; import net.minecraft.server.v1_10_R1.TileEntity; import org.bukkit.Chunk; import org.bukkit.World; @@ -474,6 +475,9 @@ public class BukkitChunk_1_10 extends CharFaweChunk { net.minecraft.server.v1_10_R1.TileEntity tileEntity = nmsWorld.getTileEntity(pos); if (tileEntity != null) { net.minecraft.server.v1_10_R1.NBTTagCompound tag = (net.minecraft.server.v1_10_R1.NBTTagCompound) com.boydti.fawe.bukkit.v1_10.BukkitQueue_1_10.methodFromNative.invoke(com.boydti.fawe.bukkit.v1_10.BukkitQueue_1_10.adapter, nativeTag); + tag.set("x", new NBTTagInt(x)); + tag.set("y", new NBTTagInt(x)); + tag.set("z", new NBTTagInt(x)); tileEntity.a(tag); // ReadTagIntoTile } } diff --git a/bukkit/src/main/java/com/boydti/fawe/bukkit/v1_11/BukkitChunk_1_11.java b/bukkit/src/main/java/com/boydti/fawe/bukkit/v1_11/BukkitChunk_1_11.java index f9f713a4..929edc05 100644 --- a/bukkit/src/main/java/com/boydti/fawe/bukkit/v1_11/BukkitChunk_1_11.java +++ b/bukkit/src/main/java/com/boydti/fawe/bukkit/v1_11/BukkitChunk_1_11.java @@ -38,6 +38,7 @@ import net.minecraft.server.v1_11_R1.EntityTypes; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.MinecraftKey; import net.minecraft.server.v1_11_R1.NBTTagCompound; +import net.minecraft.server.v1_11_R1.NBTTagInt; import net.minecraft.server.v1_11_R1.TileEntity; import org.bukkit.Chunk; import org.bukkit.World; @@ -484,6 +485,9 @@ public class BukkitChunk_1_11 extends CharFaweChunk { TileEntity tileEntity = nmsWorld.getTileEntity(pos); if (tileEntity != null) { NBTTagCompound tag = (NBTTagCompound) BukkitQueue_1_12.methodFromNative.invoke(BukkitQueue_1_12.adapter, nativeTag); + tag.set("x", new NBTTagInt(x)); + tag.set("y", new NBTTagInt(x)); + tag.set("z", new NBTTagInt(x)); tileEntity.a(tag); // ReadTagIntoTile } } diff --git a/bukkit/src/main/java/com/boydti/fawe/bukkit/v1_7/BukkitChunk_1_7.java b/bukkit/src/main/java/com/boydti/fawe/bukkit/v1_7/BukkitChunk_1_7.java index 8a47501a..c7dfa6b0 100644 --- a/bukkit/src/main/java/com/boydti/fawe/bukkit/v1_7/BukkitChunk_1_7.java +++ b/bukkit/src/main/java/com/boydti/fawe/bukkit/v1_7/BukkitChunk_1_7.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_7_R4.Entity; import net.minecraft.server.v1_7_R4.EntityPlayer; import net.minecraft.server.v1_7_R4.EntityTypes; import net.minecraft.server.v1_7_R4.NBTTagCompound; +import net.minecraft.server.v1_7_R4.NBTTagInt; import net.minecraft.server.v1_7_R4.NibbleArray; import net.minecraft.server.v1_7_R4.TileEntity; import org.bukkit.Bukkit; @@ -394,6 +395,9 @@ public class BukkitChunk_1_7 extends CharFaweChunk { TileEntity tileEntity = nmsWorld.getTileEntity(x, y, z); if (tileEntity != null) { NBTTagCompound tag = (NBTTagCompound) BukkitQueue17.methodFromNative.invoke(BukkitQueue17.adapter, nativeTag); + tag.set("x", new NBTTagInt(x)); + tag.set("y", new NBTTagInt(x)); + tag.set("z", new NBTTagInt(x)); tileEntity.a(tag); // ReadTagIntoTile } } diff --git a/bukkit/src/main/java/com/boydti/fawe/bukkit/v1_8/BukkitChunk_1_8.java b/bukkit/src/main/java/com/boydti/fawe/bukkit/v1_8/BukkitChunk_1_8.java index 1d8f25da..0485136f 100644 --- a/bukkit/src/main/java/com/boydti/fawe/bukkit/v1_8/BukkitChunk_1_8.java +++ b/bukkit/src/main/java/com/boydti/fawe/bukkit/v1_8/BukkitChunk_1_8.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_8_R3.Entity; import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.EntityTypes; import net.minecraft.server.v1_8_R3.NBTTagCompound; +import net.minecraft.server.v1_8_R3.NBTTagInt; import net.minecraft.server.v1_8_R3.TileEntity; import org.bukkit.Bukkit; import org.bukkit.Chunk; @@ -307,6 +308,9 @@ public class BukkitChunk_1_8 extends CharFaweChunk { TileEntity tileEntity = nmsWorld.getTileEntity(pos); if (tileEntity != null) { NBTTagCompound tag = (NBTTagCompound) BukkitQueue18R3.methodFromNative.invoke(BukkitQueue18R3.adapter, nativeTag); + tag.set("x", new NBTTagInt(x)); + tag.set("y", new NBTTagInt(x)); + tag.set("z", new NBTTagInt(x)); tileEntity.a(tag); // ReadTagIntoTile } } diff --git a/bukkit/src/main/java/com/boydti/fawe/bukkit/v1_9/BukkitChunk_1_9.java b/bukkit/src/main/java/com/boydti/fawe/bukkit/v1_9/BukkitChunk_1_9.java index 179348ac..22672d81 100644 --- a/bukkit/src/main/java/com/boydti/fawe/bukkit/v1_9/BukkitChunk_1_9.java +++ b/bukkit/src/main/java/com/boydti/fawe/bukkit/v1_9/BukkitChunk_1_9.java @@ -35,6 +35,7 @@ import net.minecraft.server.v1_9_R2.EntityPlayer; import net.minecraft.server.v1_9_R2.EntityTypes; import net.minecraft.server.v1_9_R2.IBlockData; import net.minecraft.server.v1_9_R2.NBTTagCompound; +import net.minecraft.server.v1_9_R2.NBTTagInt; import net.minecraft.server.v1_9_R2.TileEntity; import org.bukkit.Chunk; import org.bukkit.World; @@ -426,6 +427,9 @@ public class BukkitChunk_1_9 extends CharFaweChunk { TileEntity tileEntity = nmsWorld.getTileEntity(pos); if (tileEntity != null) { NBTTagCompound tag = (NBTTagCompound) BukkitQueue_1_9_R1.methodFromNative.invoke(BukkitQueue_1_9_R1.adapter, nativeTag); + tag.set("x", new NBTTagInt(x)); + tag.set("y", new NBTTagInt(x)); + tag.set("z", new NBTTagInt(x)); tileEntity.a(tag); // ReadTagIntoTile } }