Implement JellySquid's Entity Collision optimisations patch
This patch replaces the vanilla collision code for both block and entity collisions with faster implementations by JellySquid, used originally in her Lithium mod. Optimizes Full Block voxel collisions, and removes streams from Entity collisions Original code by JellySquid, licensed under GNU Lesser General Public License v3.0 you can find the original code on https://github.com/jellysquid3/lithium-fabric/tree/1.15.x/fabric (Yarn mappings) Ported by Co-authored-by: Zoutelande <54509836+Zoutelande@users.noreply.github.com> Touched up by Aikar to keep previous paper optimizations
This commit is contained in:
@@ -5,7 +5,7 @@ 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 9647d7850c2abe9fa7c313f994b834a70cfcac2e..cf4901ccaecff800285cfa63cbf05ab130a8b0b5 100644
|
||||
index 0d617c8e09cf0adf0d7aa8c95fc69c641f91b795..7e400f4c281a02f038834ac984df4ce35a6a7ec3 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -167,6 +167,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -16,7 +16,7 @@ index 9647d7850c2abe9fa7c313f994b834a70cfcac2e..cf4901ccaecff800285cfa63cbf05ab1
|
||||
// Spigot start
|
||||
public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
|
||||
public final boolean defaultActivationState;
|
||||
@@ -1580,6 +1581,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1581,6 +1582,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
this.bukkitEntity.storeBukkitValues(nbttagcompound);
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -28,7 +28,7 @@ index 9647d7850c2abe9fa7c313f994b834a70cfcac2e..cf4901ccaecff800285cfa63cbf05ab1
|
||||
return nbttagcompound;
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.a(throwable, "Saving entity NBT");
|
||||
@@ -1694,6 +1700,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1695,6 +1701,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
this.getBukkitEntity().readBukkitValues(nbttagcompound);
|
||||
// CraftBukkit end
|
||||
|
||||
@@ -42,7 +42,7 @@ index 9647d7850c2abe9fa7c313f994b834a70cfcac2e..cf4901ccaecff800285cfa63cbf05ab1
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT");
|
||||
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded");
|
||||
@@ -1775,6 +1788,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1776,6 +1789,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
|
||||
protected abstract void b(NBTTagCompound nbttagcompound);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user