From d21f29ec2cf133b9c9c6e541e751e798538ef113 Mon Sep 17 00:00:00 2001 From: SenseiKiwi Date: Mon, 15 Jul 2013 04:38:51 -0400 Subject: [PATCH] Minor Change to Tile Entity Exporting Rewrote the code that changes the position of a tile entity to be expressed in the schematic coordinate system. The new code should be equivalent but easier to understand. --- StevenDimDoors/mod_pocketDim/helpers/DungeonHelper.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/StevenDimDoors/mod_pocketDim/helpers/DungeonHelper.java b/StevenDimDoors/mod_pocketDim/helpers/DungeonHelper.java index 4c5292c..9e01ead 100644 --- a/StevenDimDoors/mod_pocketDim/helpers/DungeonHelper.java +++ b/StevenDimDoors/mod_pocketDim/helpers/DungeonHelper.java @@ -488,10 +488,11 @@ public class DungeonHelper //Get the tile entity's description as a compound NBT tag NBTTagCompound entityData = new NBTTagCompound(); tileEntity.writeToNBT(entityData); - //Change the tile entity's location to be relative to (xMin, yMin, zMin) - entityData.setInteger("x", entityData.getInteger("x") - xMin); - entityData.setInteger("y", entityData.getInteger("y") - yMin); - entityData.setInteger("z", entityData.getInteger("z") - zMin); + //Change the tile entity's location to the schematic coordinate system + entityData.setInteger("x", x); + entityData.setInteger("y", y); + entityData.setInteger("z", z); + tileEntities.appendTag(entityData); } }