diff options
author | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-09-15 01:23:52 +0100 |
---|---|---|
committer | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-09-15 01:23:52 +0100 |
commit | 5b2c774edc069f70d1fa9940d96bb0b8705bef7a (patch) | |
tree | 79d1800e7154bba7b5fca4f8c8373ee4376cca89 /src/main/java/net/minecraft/server/WorldServer.java | |
parent | 54bcd1c1f36691a714234e5ca2f30a20b3ad2816 (diff) | |
download | craftbukkit-5b2c774edc069f70d1fa9940d96bb0b8705bef7a.tar craftbukkit-5b2c774edc069f70d1fa9940d96bb0b8705bef7a.tar.gz craftbukkit-5b2c774edc069f70d1fa9940d96bb0b8705bef7a.tar.lz craftbukkit-5b2c774edc069f70d1fa9940d96bb0b8705bef7a.tar.xz craftbukkit-5b2c774edc069f70d1fa9940d96bb0b8705bef7a.zip |
Update for Minecraft 1.8
Diffstat (limited to 'src/main/java/net/minecraft/server/WorldServer.java')
-rw-r--r-- | src/main/java/net/minecraft/server/WorldServer.java | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java index 2005a9bc..3faa9ac4 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -20,11 +20,11 @@ public class WorldServer extends World implements BlockChangeDelegate { public boolean weirdIsOpCache = false; public boolean canSave; public final MinecraftServer server; // CraftBukkit - private -> public final - private EntityList G = new EntityList(); + private EntityList Q = new EntityList(); // CraftBukkit start - change signature - public WorldServer(MinecraftServer minecraftserver, IDataManager idatamanager, String s, int i, long j, org.bukkit.World.Environment env, ChunkGenerator gen) { - super(idatamanager, s, j, WorldProvider.byDimension(env.getId()), gen, env); + public WorldServer(MinecraftServer minecraftserver, IDataManager idatamanager, String s, int i, WorldSettings worldsettings, org.bukkit.World.Environment env, ChunkGenerator gen) { + super(idatamanager, s, worldsettings, WorldProvider.byDimension(env.getId()), gen, env); this.server = minecraftserver; this.dimension = i; @@ -54,7 +54,7 @@ public class WorldServer extends World implements BlockChangeDelegate { } protected IChunkProvider b() { - IChunkLoader ichunkloader = this.w.a(this.worldProvider); + IChunkLoader ichunkloader = this.B.a(this.worldProvider); // CraftBukkit start InternalChunkGenerator gen; @@ -78,8 +78,8 @@ public class WorldServer extends World implements BlockChangeDelegate { public List getTileEntities(int i, int j, int k, int l, int i1, int j1) { ArrayList arraylist = new ArrayList(); - for (int k1 = 0; k1 < this.c.size(); ++k1) { - TileEntity tileentity = (TileEntity) this.c.get(k1); + for (int k1 = 0; k1 < this.h.size(); ++k1) { + TileEntity tileentity = (TileEntity) this.h.get(k1); if (tileentity.x >= i && tileentity.y >= j && tileentity.z >= k && tileentity.x < l && tileentity.y < i1 && tileentity.z < j1) { arraylist.add(tileentity); @@ -90,8 +90,8 @@ public class WorldServer extends World implements BlockChangeDelegate { } public boolean a(EntityHuman entityhuman, int i, int j, int k) { - int l = (int) MathHelper.abs((float) (i - this.worldData.c())); - int i1 = (int) MathHelper.abs((float) (k - this.worldData.e())); + int l = MathHelper.a(i - this.worldData.c()); + int i1 = MathHelper.a(k - this.worldData.e()); if (l > i1) { i1 = l; @@ -103,16 +103,16 @@ public class WorldServer extends World implements BlockChangeDelegate { protected void c(Entity entity) { super.c(entity); - this.G.a(entity.id, entity); + this.Q.a(entity.id, entity); } protected void d(Entity entity) { super.d(entity); - this.G.d(entity.id); + this.Q.d(entity.id); } public Entity getEntity(int i) { - return (Entity) this.G.a(i); + return (Entity) this.Q.a(i); } public boolean strikeLightning(Entity entity) { @@ -165,18 +165,18 @@ public class WorldServer extends World implements BlockChangeDelegate { } public void saveLevel() { - this.w.e(); + this.B.e(); } - protected void i() { - boolean flag = this.v(); + protected void h() { + boolean flag = this.u(); - super.i(); - if (flag != this.v()) { + super.h(); + if (flag != this.u()) { // CraftBukkit start - only sending weather packets to those affected for (int i = 0; i < this.players.size(); ++i) { if (((EntityPlayer) this.players.get(i)).world == this) { - ((EntityPlayer) this.players.get(i)).netServerHandler.sendPacket(new Packet70Bed(flag ? 2 : 1)); + ((EntityPlayer) this.players.get(i)).netServerHandler.sendPacket(new Packet70Bed(flag ? 2 : 1, 0)); } } // CraftBukkit end |