NBTTagCompound compound = new NBTTagCompound();
compound.setBoolean("isOpen", isOpen);
compound.setBoolean("isMirrored", isMirrored);
compound.setByte("orientation", (byte) orientation.ordinal());
if (lockAttachment.getItem() != null) compound.setTag("lock", lockAttachment.getItem().writeToNBT(new NBTTagCompound()));
return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 0, compound);
}