diff options
Diffstat (limited to 'src/main/java/net/minecraft/server/World.java')
-rw-r--r-- | src/main/java/net/minecraft/server/World.java | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java index 204adaf2..805bb210 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -65,7 +65,7 @@ public class World implements IBlockAccess { public WorldProvider worldProvider; // CraftBukkit - remove final protected List z; public IChunkProvider chunkProvider; // CraftBukkit - protected -> public - protected final IDataManager B; + protected final IDataManager dataManager; public WorldData worldData; // CraftBukkit - protected -> public public boolean isLoading; private boolean Q; @@ -150,9 +150,9 @@ public class World implements IBlockAccess { this.H = new int['\u8000']; this.V = new ArrayList(); this.isStatic = false; - this.B = idatamanager; + this.dataManager = idatamanager; this.worldMaps = new WorldMapCollection(idatamanager); - this.worldData = idatamanager.c(); + this.worldData = idatamanager.getWorldData(); this.x = this.worldData == null; if (worldprovider != null) { this.worldProvider = worldprovider; @@ -184,7 +184,7 @@ public class World implements IBlockAccess { } protected IChunkProvider b() { - IChunkLoader ichunkloader = this.B.a(this.worldProvider); + IChunkLoader ichunkloader = this.dataManager.createChunkLoader(this.worldProvider); return new ChunkProviderLoadOrGenerate(this, ichunkloader, this.worldProvider.getChunkProvider()); } @@ -270,7 +270,7 @@ public class World implements IBlockAccess { private void y() { this.l(); - this.B.a(this.worldData, this.players); + this.dataManager.saveWorldData(this.worldData, this.players); this.worldMaps.a(); } @@ -1691,7 +1691,7 @@ public class World implements IBlockAccess { } public void doTick() { - if (this.r().isHardcore() && this.difficulty < 3) { + if (this.getWorldData().isHardcore() && this.difficulty < 3) { this.difficulty = 3; } @@ -1912,7 +1912,7 @@ public class World implements IBlockAccess { i2 += k1; j2 += j; if (l2 == 0 && this.k(i2, k2, j2) <= this.random.nextInt(8) && this.a(EnumSkyBlock.SKY, i2, k2, j2) <= 0) { - EntityHuman entityhuman1 = this.a((double) i2 + 0.5D, (double) k2 + 0.5D, (double) j2 + 0.5D, 8.0D); + EntityHuman entityhuman1 = this.findNearbyPlayer((double) i2 + 0.5D, (double) k2 + 0.5D, (double) j2 + 0.5D, 8.0D); if (entityhuman1 != null && entityhuman1.e((double) i2 + 0.5D, (double) k2 + 0.5D, (double) j2 + 0.5D) > 4.0D) { this.makeSound((double) i2 + 0.5D, (double) k2 + 0.5D, (double) j2 + 0.5D, "ambient.cave.cave", 0.7F, 0.8F + this.random.nextFloat() * 0.2F); @@ -1929,7 +1929,7 @@ public class World implements IBlockAccess { j2 = j + (l1 >> 8 & 15); k2 = this.e(i2, j2); if (this.v(i2, k2, j2)) { - this.strikeLightning(new EntityWeatherStorm(this, (double) i2, (double) k2, (double) j2)); + this.strikeLightning(new EntityWeatherLighting(this, (double) i2, (double) k2, (double) j2)); this.r = 2; } } @@ -2523,10 +2523,10 @@ public class World implements IBlockAccess { } public EntityHuman findNearbyPlayer(Entity entity, double d0) { - return this.a(entity.locX, entity.locY, entity.locZ, d0); + return this.findNearbyPlayer(entity.locX, entity.locY, entity.locZ, d0); } - public EntityHuman a(double d0, double d1, double d2, double d3) { + public EntityHuman findNearbyPlayer(double d0, double d1, double d2, double d3) { double d4 = -1.0D; EntityHuman entityhuman = null; @@ -2548,11 +2548,11 @@ public class World implements IBlockAccess { return entityhuman; } - public EntityHuman b(Entity entity, double d0) { - return this.b(entity.locX, entity.locY, entity.locZ, d0); + public EntityHuman findNearbyVulnerablePlayer(Entity entity, double d0) { + return this.findNearbyVulnerablePlayer(entity.locX, entity.locY, entity.locZ, d0); } - public EntityHuman b(double d0, double d1, double d2, double d3) { + public EntityHuman findNearbyVulnerablePlayer(double d0, double d1, double d2, double d3) { double d4 = -1.0D; EntityHuman entityhuman = null; @@ -2632,7 +2632,7 @@ public class World implements IBlockAccess { } public void l() { - this.B.b(); + this.dataManager.checkSession(); } public void setTime(long i) { @@ -2681,11 +2681,11 @@ public class World implements IBlockAccess { } } - public IDataManager q() { - return this.B; + public IDataManager getDataManager() { + return this.dataManager; } - public WorldData r() { + public WorldData getWorldData() { return this.worldData; } @@ -2811,13 +2811,13 @@ public class World implements IBlockAccess { } public Random w(int i, int j, int k) { - long l = (long) i * 341873128712L + (long) j * 132897987541L + this.r().getSeed() + (long) k; + long l = (long) i * 341873128712L + (long) j * 132897987541L + this.getWorldData().getSeed() + (long) k; this.random.setSeed(l); return this.random; } - public boolean x() { + public boolean updateLights() { return false; } @@ -2835,7 +2835,7 @@ public class World implements IBlockAccess { // CraftBukkit start public UUID getUUID() { - return this.B.getUUID(); + return this.dataManager.getUUID(); } // CraftBukkit end } |