this might be safer
This commit is contained in:
parent
fb45781d1b
commit
b93b7730c9
1 changed files with 12 additions and 8 deletions
|
@ -11,7 +11,6 @@ public class LoadProcess implements Runnable
|
||||||
final int totalRegions;
|
final int totalRegions;
|
||||||
int[] currentRegion;
|
int[] currentRegion;
|
||||||
|
|
||||||
//NEW PROCESS
|
|
||||||
LoadProcess(String name, WorldObj newWorld)
|
LoadProcess(String name, WorldObj newWorld)
|
||||||
{
|
{
|
||||||
ConfigProcess.addNew(name, newWorld);
|
ConfigProcess.addNew(name, newWorld);
|
||||||
|
@ -19,11 +18,16 @@ public class LoadProcess implements Runnable
|
||||||
world = Bukkit.getWorld(name);
|
world = Bukkit.getWorld(name);
|
||||||
totalRegions = newWorld.total;
|
totalRegions = newWorld.total;
|
||||||
currentRegion = newWorld.current;
|
currentRegion = newWorld.current;
|
||||||
|
|
||||||
|
n = 1;
|
||||||
|
c = 1;
|
||||||
|
D = 1;
|
||||||
|
d = 0;
|
||||||
|
B = false;
|
||||||
}
|
}
|
||||||
//RESUME
|
|
||||||
LoadProcess(String name)
|
LoadProcess(String name)
|
||||||
{
|
{
|
||||||
final WorldObj unfinished = ConfigProcess.getUnfinished(name);
|
WorldObj unfinished = ConfigProcess.getUnfinished(name);
|
||||||
|
|
||||||
world = Bukkit.getWorld(name);
|
world = Bukkit.getWorld(name);
|
||||||
totalRegions = unfinished.total;
|
totalRegions = unfinished.total;
|
||||||
|
@ -57,11 +61,11 @@ public class LoadProcess implements Runnable
|
||||||
* etc.
|
* etc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int n = 1; //how many regions have been saved already
|
int n; //how many regions have been saved already
|
||||||
int c = 1; //direction of travel: E,N,W,S - 1,2,3,4
|
int c; //direction of travel: E,N,W,S - 1,2,3,4
|
||||||
int D = 1; //distance to travel
|
int D; //distance to travel
|
||||||
int d = 0; //distance already traveled
|
int d; //distance already traveled
|
||||||
boolean B = false; //OK to increase distance?
|
boolean B; //OK to increase distance?
|
||||||
|
|
||||||
private final boolean setNextRegion()
|
private final boolean setNextRegion()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue