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:
@@ -5,10 +5,10 @@ Subject: [PATCH] Entity Origin API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index ab206417c..e3084445f 100644
|
||||
index 041af8070..43b802855 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 org.bukkit.projectiles.ProjectileSource projectileSource; // For projectiles only
|
||||
public boolean forceExplosionKnockback; // SPIGOT-949
|
||||
public Timing tickTimer = MinecraftTimings.getEntityTimings(this); // Paper
|
||||
@@ -16,7 +16,7 @@ index ab206417c..e3084445f 100644
|
||||
// Spigot start
|
||||
public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
|
||||
public final boolean defaultActivationState;
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener {
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ index ab206417c..e3084445f 100644
|
||||
return nbttagcompound;
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.a(throwable, "Saving entity NBT");
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener {
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
@@ -42,7 +42,7 @@ index ab206417c..e3084445f 100644
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT");
|
||||
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded");
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener {
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper
|
||||
|
||||
protected abstract void b(NBTTagCompound nbttagcompound);
|
||||
|
||||
@@ -118,7 +118,7 @@ index 26d4bd690..31b765dea 100644
|
||||
flag = true;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index c5a194ffe..00d842629 100644
|
||||
index 833e3111d..6c23e88a5 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -0,0 +0,0 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
|
||||
Reference in New Issue
Block a user