()
| 122 | } |
| 123 | |
| 124 | @RPC(RPCSide.SERVER) |
| 125 | private void save() { |
| 126 | if (sequence != null) { |
| 127 | File sequenceFile = new File(testName + ".seq"); |
| 128 | |
| 129 | OutputStream gzOs = null; |
| 130 | try { |
| 131 | NBTTagCompound nbt = new NBTTagCompound(); |
| 132 | sequence.writeToNBT(nbt); |
| 133 | |
| 134 | FileOutputStream f = new FileOutputStream(sequenceFile); |
| 135 | f.write(CompressedStreamTools.compress(nbt)); |
| 136 | f.close(); |
| 137 | } catch (IOException ex) { |
| 138 | Logger.getLogger("Buildcraft").log(Level.SEVERE, |
| 139 | String.format("Failed to save Sequence file: %s %s", sequenceFile, ex.getMessage())); |
| 140 | } finally { |
| 141 | try { |
| 142 | if (gzOs != null) { |
| 143 | gzOs.close(); |
| 144 | } |
| 145 | } catch (IOException e) { |
| 146 | } |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | sequence.actions.clear(); |
| 151 | updateInformation(); |
| 152 | } |
| 153 | |
| 154 | @RPC(RPCSide.SERVER) |
| 155 | private void setName(String name) { |
nothing calls this directly
no test coverage detected