Merge pull request #49 from cpw/master

Update to fml 68: fixes a ticking issue and soft vs hard dependencies
This commit is contained in:
LexManos 2012-04-15 08:36:06 -07:00
commit 70623843cc
2 changed files with 7 additions and 8 deletions

View file

@ -90,7 +90,10 @@
AnvilSaveHandler var9 = new AnvilSaveHandler(new File("."), par2Str, true); AnvilSaveHandler var9 = new AnvilSaveHandler(new File("."), par2Str, true);
- -
- for (int var10 = 0; var10 < this.worldMngr.length; ++var10) - for (int var10 = 0; var10 < this.worldMngr.length; ++var10)
- { +
+ WorldServer overWorld = new WorldServer(this, var9, par2Str, 0, var8);
+ for (Integer id : DimensionManager.getIDs())
{
- byte var11 = 0; - byte var11 = 0;
- -
- if (var10 == 1) - if (var10 == 1)
@ -117,10 +120,6 @@
- this.worldMngr[var10].setAllowedSpawnTypes(this.propertyManagerObj.getBooleanProperty("spawn-monsters", true), this.spawnPeacefulMobs); - this.worldMngr[var10].setAllowedSpawnTypes(this.propertyManagerObj.getBooleanProperty("spawn-monsters", true), this.spawnPeacefulMobs);
- this.worldMngr[var10].getWorldInfo().setGameType(var6); - this.worldMngr[var10].getWorldInfo().setGameType(var6);
- this.configManager.setPlayerManager(this.worldMngr); - this.configManager.setPlayerManager(this.worldMngr);
+
+ WorldServer overWorld = new WorldServer(this, var9, par2Str, 0, var8);
+ for (Integer id : DimensionManager.getIDs())
+ {
+ WorldServer world = (id == 0 ? overWorld : new WorldServerMulti(this, var9, par2Str, id, var8, overWorld)); + WorldServer world = (id == 0 ? overWorld : new WorldServerMulti(this, var9, par2Str, id, var8, overWorld));
+ world.addWorldAccess(new WorldManager(this, world)); + world.addWorldAccess(new WorldManager(this, world));
+ world.difficultySetting = propertyManagerObj.getIntProperty("difficulty", 1); + world.difficultySetting = propertyManagerObj.getIntProperty("difficulty", 1);
@ -172,7 +171,7 @@
} }
} }
} }
@@ -440,7 +433,7 @@ @@ -439,7 +432,7 @@
var3 += var7; var3 += var7;
var1 = var5; var1 = var5;
@ -217,7 +216,7 @@
} }
for (var9 = 0; var9 < this.playersOnline.size(); ++var9) for (var9 = 0; var9 < this.playersOnline.size(); ++var9)
@@ -689,7 +682,8 @@ @@ -691,7 +684,8 @@
*/ */
public WorldServer getWorldManager(int par1) public WorldServer getWorldManager(int par1)
{ {
@ -227,7 +226,7 @@
} }
/** /**
@@ -697,7 +691,7 @@ @@ -699,7 +693,7 @@
*/ */
public EntityTracker getEntityTracker(int par1) public EntityTracker getEntityTracker(int par1)
{ {