(File aSaveLocation)
| 1472 | } |
| 1473 | |
| 1474 | public static void onServerLoad(File aSaveLocation) { |
| 1475 | GARBAGE_ITEMS.clear(); |
| 1476 | File aTargetFile = new File(new File(aSaveLocation, "gregtech"), "endergarbage.items.dat"); |
| 1477 | if (aTargetFile.exists()) { |
| 1478 | NBTTagCompound aNBT = UT.NBT.make(); |
| 1479 | try {aNBT = CompressedStreamTools.read(aTargetFile);} catch (Throwable e) {e.printStackTrace(ERR);} |
| 1480 | for (int i = 0; i < Integer.MAX_VALUE; i++) { |
| 1481 | if (!aNBT.hasKey(""+i)) break; |
| 1482 | ItemStack aStack = ST.load(aNBT, ""+i); |
| 1483 | if (aStack == null || aStack.stackSize <= 0 || BLACKLIST.contains(aStack, T)) continue; |
| 1484 | GARBAGE_ITEMS.add(aStack); |
| 1485 | } |
| 1486 | } |
| 1487 | |
| 1488 | GARBAGE_FLUIDS.clear(); |
| 1489 | aTargetFile = new File(new File(aSaveLocation, "gregtech"), "endergarbage.fluids.dat"); |
| 1490 | if (aTargetFile.exists()) { |
| 1491 | NBTTagCompound aNBT = UT.NBT.make(); |
| 1492 | try {aNBT = CompressedStreamTools.read(aTargetFile);} catch (Throwable e) {e.printStackTrace(ERR);} |
| 1493 | for (int i = 0; i < Integer.MAX_VALUE; i++) { |
| 1494 | if (!aNBT.hasKey(""+i)) break; |
| 1495 | FluidTankGT tTank = new FluidTankGT().setPreventDraining().setVoidExcess(); |
| 1496 | tTank.readFromNBT(aNBT, ""+i); |
| 1497 | if (!tTank.has()) continue; |
| 1498 | GARBAGE_FLUIDS.add(tTank); |
| 1499 | } |
| 1500 | } |
| 1501 | } |
| 1502 | } |
| 1503 | |
| 1504 | public static class DrinksGT { |
no test coverage detected