By: md_5 <md_5@live.com.au>
This commit is contained in:
Spigot
2013-12-01 14:40:53 +11:00
parent 90518adcbb
commit ff79e2c7df
77 changed files with 706 additions and 2980 deletions

View File

@@ -1,14 +1,14 @@
From 60ef2965fff046cd970c123c931facd7ee291f39 Mon Sep 17 00:00:00 2001
From 4aa2e37f77d90bcae16a89d4aff9727bd4a1fcab Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Tue, 11 Jun 2013 12:17:37 +1000
Subject: [PATCH] More Efficient GetCubes
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 15d2a62..8ac0e8e 100644
index f0a8024..a8dbc44 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1044,19 +1044,47 @@ public abstract class World implements IBlockAccess {
@@ -1015,16 +1015,42 @@ public abstract class World implements IBlockAccess {
int i1 = MathHelper.floor(axisalignedbb.c);
int j1 = MathHelper.floor(axisalignedbb.f + 1.0D);
@@ -16,10 +16,12 @@ index 15d2a62..8ac0e8e 100644
- for (int l1 = i1; l1 < j1; ++l1) {
- if (this.isLoaded(k1, 64, l1)) {
- for (int i2 = k - 1; i2 < l; ++i2) {
- Block block = Block.byId[this.getTypeId(k1, i2, l1)];
- Block block;
-
- if (block != null) {
- block.a(this, k1, i2, l1, axisalignedbb, this.M, entity);
- if (k1 >= -30000000 && k1 < 30000000 && l1 >= -30000000 && l1 < 30000000) {
- block = this.getType(k1, i2, l1);
- } else {
- block = Blocks.STONE;
+ // Spigot start
+ int ystart = ( ( k - 1 ) < 0 ) ? 0 : ( k - 1 );
+ for ( int chunkx = ( i >> 4 ); chunkx <= ( ( j - 1 ) >> 4 ); chunkx++ )
@@ -53,10 +55,13 @@ index 15d2a62..8ac0e8e 100644
+ if ( block != null )
+ {
+ block.a( this, x, y, z, axisalignedbb, this.M, entity );
+ // SPIGOT TODO: THIS DIFF
+ }
+ }
}
}
block.a(this, k1, i2, l1, axisalignedbb, this.M, entity);
@@ -1032,6 +1058,7 @@ public abstract class World implements IBlockAccess {
}
}
}
@@ -65,5 +70,5 @@ index 15d2a62..8ac0e8e 100644
double d0 = 0.25D;
List list = this.getEntities(entity, axisalignedbb.grow(d0, d0, d0));
--
1.8.1.2
1.8.3.2