From e7a5c5b53c288c27817ba51a6b182a5179669d0c Mon Sep 17 00:00:00 2001 From: OvermindDL1 Date: Thu, 6 Jun 2013 21:22:23 -0500 Subject: [PATCH] Update dimHelper.java Fixed crash bug and fixed surrounding indention. Completely untested, but should work. --- StevenDimDoors/mod_pocketDim/dimHelper.java | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/StevenDimDoors/mod_pocketDim/dimHelper.java b/StevenDimDoors/mod_pocketDim/dimHelper.java index 83713aa..126ce5f 100644 --- a/StevenDimDoors/mod_pocketDim/dimHelper.java +++ b/StevenDimDoors/mod_pocketDim/dimHelper.java @@ -1047,15 +1047,18 @@ public class dimHelper extends DimensionManager //TODO change from saving serialized objects to just saving data for compatabilies sake. public void save() { - if(!this.isSaving&&!DimensionManager.getWorld(0).isRemote&&this.getCurrentSaveRootDirectory()!=null) + if(this.isSaving) return; + World world = DimensionManager.getWorld(0); + if(world==null || world.isRemote) return; + if(this.getCurrentSaveRootDirectory()!=null) { - // System.out.println("saving"); + //System.out.println("saving"); - this.isSaving=true; - HashMap comboSave=new HashMap(); - comboSave.put("dimList", this.dimList); - comboSave.put("interDimLinkList", this.interDimLinkList); - comboSave.put("blocksToDecay", this.blocksToDecay); + this.isSaving=true; + HashMap comboSave=new HashMap(); + comboSave.put("dimList", this.dimList); + comboSave.put("interDimLinkList", this.interDimLinkList); + comboSave.put("blocksToDecay", this.blocksToDecay); @@ -1432,4 +1435,4 @@ public class dimHelper extends DimensionManager } -} \ No newline at end of file +}