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.
This commit is contained in:
@@ -488,10 +488,11 @@ public class DungeonHelper
|
|||||||
//Get the tile entity's description as a compound NBT tag
|
//Get the tile entity's description as a compound NBT tag
|
||||||
NBTTagCompound entityData = new NBTTagCompound();
|
NBTTagCompound entityData = new NBTTagCompound();
|
||||||
tileEntity.writeToNBT(entityData);
|
tileEntity.writeToNBT(entityData);
|
||||||
//Change the tile entity's location to be relative to (xMin, yMin, zMin)
|
//Change the tile entity's location to the schematic coordinate system
|
||||||
entityData.setInteger("x", entityData.getInteger("x") - xMin);
|
entityData.setInteger("x", x);
|
||||||
entityData.setInteger("y", entityData.getInteger("y") - yMin);
|
entityData.setInteger("y", y);
|
||||||
entityData.setInteger("z", entityData.getInteger("z") - zMin);
|
entityData.setInteger("z", z);
|
||||||
|
|
||||||
tileEntities.appendTag(entityData);
|
tileEntities.appendTag(entityData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user