Update CraftBukkit to Minecraft 1.7.5

This commit is contained in:
Nate Mortensen
2014-03-20 22:26:30 -06:00
committed by EvilSeph
parent afb3511a4a
commit 385ace970e
206 changed files with 2670 additions and 2679 deletions

View File

@@ -54,7 +54,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
// CraftBukkit end
this.server = minecraftserver;
this.tracker = new EntityTracker(this);
this.manager = new PlayerChunkMap(this, minecraftserver.getPlayerList().o());
this.manager = new PlayerChunkMap(this);
if (this.entitiesById == null) {
this.entitiesById = new IntHashMap();
}
@@ -219,7 +219,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
}
public BiomeMeta a(EnumCreatureType enumcreaturetype, int i, int j, int k) {
List list = this.K().getMobsFor(enumcreaturetype, i, j, k);
List list = this.L().getMobsFor(enumcreaturetype, i, j, k);
return list != null && !list.isEmpty() ? (BiomeMeta) WeightedRandom.a(this.random, (Collection) list) : null;
}
@@ -326,7 +326,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
int k1;
int l1;
if (this.random.nextInt(100000) == 0 && this.P() && this.O()) {
if (this.random.nextInt(100000) == 0 && this.Q() && this.P()) {
this.k = this.k * 3 + 1013904223;
i1 = this.k >> 2;
j1 = k + (i1 & 15);
@@ -357,7 +357,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
// CraftBukkit end
}
if (this.P() && this.e(j1 + k, l1, k1 + l, true)) {
if (this.Q() && this.e(j1 + k, l1, k1 + l, true)) {
// CraftBukkit start
BlockState blockState = this.getWorld().getBlockAt(j1 + k, l1, k1 + l).getState();
blockState.setTypeId(Block.b(Blocks.SNOW));
@@ -370,7 +370,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
// CraftBukkit end
}
if (this.P()) {
if (this.Q()) {
BiomeBase biomebase = this.getBiome(j1 + k, k1 + l);
if (biomebase.e()) {
@@ -765,17 +765,28 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
}
this.chunkProvider.saveChunks(flag, iprogressupdate);
// CraftBukkit - List -> Collection
Collection list = this.chunkProviderServer.a();
Iterator iterator = list.iterator();
while (iterator.hasNext()) {
Chunk chunk = (Chunk) iterator.next();
if (!this.manager.a(chunk.locX, chunk.locZ)) {
this.chunkProviderServer.queueUnload(chunk.locX, chunk.locZ);
}
}
}
}
public void flushSave() {
if (this.chunkProvider.canSave()) {
this.chunkProvider.b();
this.chunkProvider.c();
}
}
protected void a() throws ExceptionWorldConflict { // CraftBukkit - added throws
this.F();
this.G();
this.dataManager.saveWorldData(this.worldData, this.server.getPlayerList().q());
// CraftBukkit start - save worldMaps once, rather than once per shared world
if (!(this instanceof SecondaryWorldServer)) {
@@ -787,7 +798,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
protected void a(Entity entity) {
super.a(entity);
this.entitiesById.a(entity.getId(), entity);
Entity[] aentity = entity.at();
Entity[] aentity = entity.as();
if (aentity != null) {
for (int i = 0; i < aentity.length; ++i) {
@@ -799,7 +810,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
protected void b(Entity entity) {
super.b(entity);
this.entitiesById.d(entity.getId());
Entity[] aentity = entity.at();
Entity[] aentity = entity.as();
if (aentity != null) {
for (int i = 0; i < aentity.length; ++i) {
@@ -915,7 +926,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
}
protected void o() {
boolean flag = this.P();
boolean flag = this.Q();
super.o();
/* CraftBukkit start
@@ -927,7 +938,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
this.server.getPlayerList().a(new PacketPlayOutGameStateChange(8, this.p), this.worldProvider.dimension);
}
if (flag != this.P()) {
if (flag != this.Q()) {
if (flag) {
this.server.getPlayerList().sendAll(new PacketPlayOutGameStateChange(2, 0.0F));
} else {
@@ -949,6 +960,10 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
}
}
protected int p() {
return this.server.getPlayerList().o();
}
public MinecraftServer getMinecraftServer() {
return this.server;
}
@@ -961,7 +976,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
return this.manager;
}
public PortalTravelAgent t() {
public PortalTravelAgent getTravelAgent() {
return this.Q;
}