(File aSaveLocation)
| 1458 | |
| 1459 | |
| 1460 | public static void onServerSave(File aSaveLocation) { |
| 1461 | File aTargetFile = new File(new File(aSaveLocation, "gregtech"), "endergarbage.items.dat"); |
| 1462 | if (!aTargetFile.exists()) {try {aTargetFile.createNewFile();} catch (Throwable e) {e.printStackTrace(ERR);}} |
| 1463 | NBTTagCompound aNBT = UT.NBT.make(); |
| 1464 | for (int i = 0; i < GARBAGE_ITEMS.size(); i++) ST.save(aNBT, ""+i, GARBAGE_ITEMS.get(i)); |
| 1465 | try {CompressedStreamTools.write(aNBT, aTargetFile);} catch (Throwable e) {e.printStackTrace(ERR);} |
| 1466 | |
| 1467 | aTargetFile = new File(new File(aSaveLocation, "gregtech"), "endergarbage.fluids.dat"); |
| 1468 | if (!aTargetFile.exists()) {try {aTargetFile.createNewFile();} catch (Throwable e) {e.printStackTrace(ERR);}} |
| 1469 | aNBT = UT.NBT.make(); |
| 1470 | for (int i = 0; i < GARBAGE_FLUIDS.size(); i++) GARBAGE_FLUIDS.get(i).writeToNBT(aNBT, ""+i); |
| 1471 | try {CompressedStreamTools.write(aNBT, aTargetFile);} catch (Throwable e) {e.printStackTrace(ERR);} |
| 1472 | } |
| 1473 | |
| 1474 | public static void onServerLoad(File aSaveLocation) { |
| 1475 | GARBAGE_ITEMS.clear(); |
no test coverage detected