Improved on last saving upgrade.

This commit is contained in:
Brianna 2020-01-17 12:53:49 -05:00
parent de7747b8c1
commit 5d98dea24b

View File

@ -31,7 +31,10 @@ public abstract class Storage {
* Dump HopperManager to file.
*/
for (Hopper hopper : new ArrayList<>(instance.getHopperManager().getHoppers().values())) {
if (hopper.getLevel() == null || hopper.getLocation() == null || hopper.getLevel() == instance.getLevelManager().getLowestLevel())
if (hopper.getLevel() == null
|| hopper.getLocation() == null
|| hopper.getLevel() == instance.getLevelManager().getLowestLevel()
&& (hopper.getLinkedBlocks() == null || hopper.getLinkedBlocks().isEmpty()))
continue;
String locationStr = Methods.serializeLocation(hopper.getLocation());