Current Chunk for Entity and Block Entities, counts by entity type

This enables us a fast reference to the entities current chunk instead
of having to look it up by hashmap lookups.

We also store counts by type to further enable other performance optimizations in later patches.
This commit is contained in:
Aikar
2018-07-04 03:55:24 -04:00
parent 58a2e2dc04
commit 8778a2ef97
157 changed files with 666 additions and 294 deletions

View File

@@ -32,10 +32,10 @@ index 067cb233e..06acdaaf0 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 65cee8cf0..4f4541a64 100644
index 945f06c93..cb9ef622c 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener {
@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper
}
public boolean aq() {
@@ -47,7 +47,7 @@ index 65cee8cf0..4f4541a64 100644
if (this.bJ() instanceof EntityBoat) {
this.inWater = false;
} else if (this.world.a(this.getBoundingBox().grow(0.0D, -0.4000000059604645D, 0.0D).shrink(0.001D), Material.WATER, this)) {
@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener {
@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper
}
public boolean bo() {