@@ -1,6 +1,6 @@
|
||||
From 9689ef70b5f735de03b42766e0d8bef5cb5817a6 Mon Sep 17 00:00:00 2001
|
||||
From 3954712a256ec0cef75ca027cea84aa91ec43f41 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Tue, 11 Jun 2013 12:02:53 +1000
|
||||
Date: Tue, 11 Jun 2013 12:16:05 +1000
|
||||
Subject: [PATCH] Spigot Changes
|
||||
|
||||
|
||||
@@ -202,7 +202,7 @@ index b7e327b..0e3a6a1 100644
|
||||
String s2 = socketaddress.toString();
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 3a4ddea..70dd295 100644
|
||||
index 3a4ddea..4d0facf 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -66,14 +66,27 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -270,55 +270,7 @@ index 3a4ddea..70dd295 100644
|
||||
if (worldprovider != null) {
|
||||
this.worldProvider = worldprovider;
|
||||
} else if (this.worldData != null && this.worldData.j() != 0) {
|
||||
@@ -1016,6 +1037,39 @@ public abstract class World implements IBlockAccess {
|
||||
int i1 = MathHelper.floor(axisalignedbb.c);
|
||||
int j1 = MathHelper.floor(axisalignedbb.f + 1.0D);
|
||||
|
||||
+ // Spigot start
|
||||
+ int ystart = ((k - 1) < 0) ? 0 : (k - 1);
|
||||
+ for (int chunkx = (i >> 4); chunkx <= ((j - 1) >> 4); chunkx++) {
|
||||
+ int cx = chunkx << 4;
|
||||
+ for (int chunkz = (i1 >> 4); chunkz <= ((j1 - 1) >> 4); chunkz++) {
|
||||
+ if (!this.isChunkLoaded(chunkx, chunkz)) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ int cz = chunkz << 4;
|
||||
+ Chunk chunk = this.getChunkAt(chunkx, chunkz);
|
||||
+ // Compute ranges within chunk
|
||||
+ int xstart = (i < cx) ? cx : i;
|
||||
+ int xend = (j < (cx + 16)) ? j : (cx + 16);
|
||||
+ int zstart = (i1 < cz) ? cz : i1;
|
||||
+ int zend = (j1 < (cz + 16)) ? j1 : (cz + 16);
|
||||
+ // Loop through blocks within chunk
|
||||
+ for (int x = xstart; x < xend; x++) {
|
||||
+ for (int z = zstart; z < zend; z++) {
|
||||
+ for (int y = ystart; y < l; y++) {
|
||||
+ int blkid = chunk.getTypeId(x - cx, y, z - cz);
|
||||
+ if (blkid > 0) {
|
||||
+ Block block = Block.byId[blkid];
|
||||
+
|
||||
+ if (block != null) {
|
||||
+ block.a(this, x, y, z, axisalignedbb, this.M, entity);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ /*
|
||||
for (int k1 = i; k1 < j; ++k1) {
|
||||
for (int l1 = i1; l1 < j1; ++l1) {
|
||||
if (this.isLoaded(k1, 64, l1)) {
|
||||
@@ -1029,6 +1083,7 @@ public abstract class World implements IBlockAccess {
|
||||
}
|
||||
}
|
||||
}
|
||||
+ */// Spigot end
|
||||
|
||||
double d0 = 0.25D;
|
||||
List list = this.getEntities(entity, axisalignedbb.grow(d0, d0, d0));
|
||||
@@ -1945,6 +2000,11 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1945,6 +1966,11 @@ public abstract class World implements IBlockAccess {
|
||||
this.worldData.setWeatherDuration(1);
|
||||
}
|
||||
|
||||
@@ -330,7 +282,7 @@ index 3a4ddea..70dd295 100644
|
||||
protected void B() {
|
||||
// this.chunkTickList.clear(); // CraftBukkit - removed
|
||||
this.methodProfiler.a("buildList");
|
||||
@@ -1954,25 +2014,42 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1954,25 +1980,42 @@ public abstract class World implements IBlockAccess {
|
||||
int j;
|
||||
int k;
|
||||
|
||||
@@ -387,7 +339,7 @@ index 3a4ddea..70dd295 100644
|
||||
|
||||
this.methodProfiler.b();
|
||||
if (this.O > 0) {
|
||||
@@ -1980,7 +2057,7 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -1980,7 +2023,7 @@ public abstract class World implements IBlockAccess {
|
||||
}
|
||||
|
||||
this.methodProfiler.a("playerCheckLight");
|
||||
|
||||
Reference in New Issue
Block a user