mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-17 13:24:17 -07:00
Update for 1.0.0
This commit is contained in:
@@ -20,7 +20,7 @@ public class WorldServer extends World implements BlockChangeDelegate {
|
||||
public boolean weirdIsOpCache = false;
|
||||
public boolean savingDisabled;
|
||||
public final MinecraftServer server; // CraftBukkit - private -> public final
|
||||
private EntityList Q = new EntityList();
|
||||
private EntityList N = new EntityList();
|
||||
|
||||
// CraftBukkit start - change signature
|
||||
public WorldServer(MinecraftServer minecraftserver, IDataManager idatamanager, String s, int i, WorldSettings worldsettings, org.bukkit.World.Environment env, ChunkGenerator gen) {
|
||||
@@ -159,16 +159,30 @@ public class WorldServer extends World implements BlockChangeDelegate {
|
||||
|
||||
protected void c(Entity entity) {
|
||||
super.c(entity);
|
||||
this.Q.a(entity.id, entity);
|
||||
this.N.a(entity.id, entity);
|
||||
Entity[] aentity = entity.aG();
|
||||
|
||||
if (aentity != null) {
|
||||
for (int i = 0; i < aentity.length; ++i) {
|
||||
this.N.a(aentity[i].id, aentity[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void d(Entity entity) {
|
||||
super.d(entity);
|
||||
this.Q.d(entity.id);
|
||||
this.N.d(entity.id);
|
||||
Entity[] aentity = entity.aG();
|
||||
|
||||
if (aentity != null) {
|
||||
for (int i = 0; i < aentity.length; ++i) {
|
||||
this.N.d(aentity[i].id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Entity getEntity(int i) {
|
||||
return (Entity) this.Q.a(i);
|
||||
return (Entity) this.N.a(i);
|
||||
}
|
||||
|
||||
public boolean strikeLightning(Entity entity) {
|
||||
@@ -224,11 +238,11 @@ public class WorldServer extends World implements BlockChangeDelegate {
|
||||
this.B.e();
|
||||
}
|
||||
|
||||
protected void h() {
|
||||
boolean flag = this.u();
|
||||
protected void i() {
|
||||
boolean flag = this.w();
|
||||
|
||||
super.h();
|
||||
if (flag != this.u()) {
|
||||
super.i();
|
||||
if (flag != this.w()) {
|
||||
// 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) {
|
||||
|
Reference in New Issue
Block a user