9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-23 17:09:26 +00:00

Update Paper

This commit is contained in:
violetc
2024-01-24 12:37:02 +08:00
parent e016ccd1db
commit fe2d9ed2df
50 changed files with 385 additions and 395 deletions

View File

@@ -6,10 +6,10 @@ Subject: [PATCH] Skip entity move if movement is zero
This patch is Powered by Gale(https://github.com/GaleMC/Gale)
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index c3a91af3a6e9ca8177994bacaf375d1e7df1d0c4..f9682798c74aaae9c0610c00b2f52cda990e35a4 100644
index 42249dc3f994d1e4ce1c5e1c6e2ec1f7d4d41324..a4acf29239e1c05e8afc42c92763f00a31762aa0 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -317,6 +317,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -316,6 +316,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
public float yRotO;
public float xRotO;
private AABB bb;
@@ -17,7 +17,7 @@ index c3a91af3a6e9ca8177994bacaf375d1e7df1d0c4..f9682798c74aaae9c0610c00b2f52cda
public boolean onGround;
public boolean horizontalCollision;
public boolean verticalCollision;
@@ -1052,6 +1053,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -1051,6 +1052,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
// Paper end - detailed watchdog information
public void move(MoverType movementType, Vec3 movement) {
@@ -28,10 +28,10 @@ index c3a91af3a6e9ca8177994bacaf375d1e7df1d0c4..f9682798c74aaae9c0610c00b2f52cda
+ }
+ }
+ // Leaves end - skip entity move if movement is zero
final Vec3 originalMovement = movement; // Paper - Expose pre-collision velocity
// Paper start - detailed watchdog information
io.papermc.paper.util.TickThread.ensureTickThread("Cannot move an entity off-main");
synchronized (this.posLock) {
@@ -4084,6 +4092,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -4082,6 +4090,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
public final void setBoundingBox(AABB boundingBox) {