diff --git a/gradle.properties b/gradle.properties index 84921b5..f273154 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ group=me.samsuik.sakura version=1.21.5-R0.1-SNAPSHOT mcVersion=1.21.5 -paperRef=2ba1675c7506cadd8a540ea452e5dafb79ae8947 +paperRef=a1b30587d9d5a5d9bf1530f7d1e289f2e29991b6 org.gradle.jvmargs=-Xmx2G org.gradle.vfs.watch=false diff --git a/sakura-server/minecraft-patches/features/0002-Client-Visibility-Settings.patch b/sakura-server/minecraft-patches/features/0002-Client-Visibility-Settings.patch index 5ab6a3c..3188cef 100644 --- a/sakura-server/minecraft-patches/features/0002-Client-Visibility-Settings.patch +++ b/sakura-server/minecraft-patches/features/0002-Client-Visibility-Settings.patch @@ -195,7 +195,7 @@ index 186393485396cfe9b1baef29586198356e2d2600..a06f5a9b577cd9cc2cb948b2801b0aec } } diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 064a9b6cf6792192fc1fa80095a48c2025cebf2a..266a8e6b164d6d76c2fc26c986290569781cf871 100644 +index 9041830c19e2899479e1519488faba5c416ccd88..2708d162c24e1d446485cd49f7b47abc0bcd5054 100644 --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -3192,6 +3192,7 @@ public class ServerGamePacketListenerImpl @@ -207,10 +207,10 @@ index 064a9b6cf6792192fc1fa80095a48c2025cebf2a..266a8e6b164d6d76c2fc26c986290569 if (this.player.containerMenu != oldContainer) { return; diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 96533cb586bb9c15350a6de3d644a7781d6ce8dc..c230477e45603deac6e6055d889b8483955f58d4 100644 +index d96d493b3d14cf84a7ecf0d531aa35d41a801601..92fd4bb2b2473a0630cd5edf8d301dc7c60b2998 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -512,6 +512,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -516,6 +516,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } // Paper end - optimise entity tracker public boolean pushedByFluid = true; // Sakura - entity pushed by fluid api diff --git a/sakura-server/minecraft-patches/features/0003-Load-Chunks-on-Movement.patch b/sakura-server/minecraft-patches/features/0003-Load-Chunks-on-Movement.patch index 79f5fcf..2378b75 100644 --- a/sakura-server/minecraft-patches/features/0003-Load-Chunks-on-Movement.patch +++ b/sakura-server/minecraft-patches/features/0003-Load-Chunks-on-Movement.patch @@ -51,10 +51,10 @@ index f91eed907ffc61a4092aabaa0a1b061c2c453673..0159517f425491ce490d982a09e40efd public static TicketType register(String name, long timeout, boolean persist, TicketType.TicketUse use) { return Registry.register(BuiltInRegistries.TICKET_TYPE, name, new TicketType(timeout, persist, use)); diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index c230477e45603deac6e6055d889b8483955f58d4..9959c7488167d5a0905e772d4b23d08eb8148762 100644 +index 92fd4bb2b2473a0630cd5edf8d301dc7c60b2998..ccd0497ec6587086e6d2f8da0f8d0ae606449d37 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -516,6 +516,20 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -520,6 +520,20 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess public boolean isPrimedTNT; public boolean isFallingBlock; // Sakura end - client visibility settings @@ -75,7 +75,7 @@ index c230477e45603deac6e6055d889b8483955f58d4..9959c7488167d5a0905e772d4b23d08e public Entity(EntityType entityType, Level level) { this.type = entityType; -@@ -1487,7 +1501,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1491,7 +1505,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess ca.spottedleaf.moonrise.patches.collisions.CollisionUtil.getCollisionsForBlocksOrWorldBorder( this.level, (Entity)(Object)this, initialCollisionBox, potentialCollisionsVoxel, potentialCollisionsBB, @@ -84,7 +84,7 @@ index c230477e45603deac6e6055d889b8483955f58d4..9959c7488167d5a0905e772d4b23d08e ); potentialCollisionsBB.addAll(entityAABBs); final Vec3 collided = ca.spottedleaf.moonrise.patches.collisions.CollisionUtil.performCollisions(movement, currentBox, potentialCollisionsVoxel, potentialCollisionsBB); -@@ -4948,13 +4962,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4952,13 +4966,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @Override public boolean shouldBeSaved() { return (this.removalReason == null || this.removalReason.shouldSave()) diff --git a/sakura-server/minecraft-patches/features/0004-Slice-Packet-obfuscation-and-reduction.patch b/sakura-server/minecraft-patches/features/0004-Slice-Packet-obfuscation-and-reduction.patch index fae4196..3346207 100644 --- a/sakura-server/minecraft-patches/features/0004-Slice-Packet-obfuscation-and-reduction.patch +++ b/sakura-server/minecraft-patches/features/0004-Slice-Packet-obfuscation-and-reduction.patch @@ -153,10 +153,10 @@ index b118e91f1e0b5a8b8c0b2a4a32faabc5a34a5954..b26b47afe4533d223d0079e4733ef017 if (this.entity instanceof LivingEntity) { diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 9959c7488167d5a0905e772d4b23d08eb8148762..46b82a1b7a3859681dec3e141ac6ea97672fcf97 100644 +index ccd0497ec6587086e6d2f8da0f8d0ae606449d37..3c638e9039a037d20c008f22f0c5bace3d3493c6 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -3440,7 +3440,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3444,7 +3444,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.entityData.markDirty(Entity.DATA_AIR_SUPPLY_ID); return; } diff --git a/sakura-server/minecraft-patches/features/0007-Store-Entity-Data-State.patch b/sakura-server/minecraft-patches/features/0007-Store-Entity-Data-State.patch index 50f114f..95f639b 100644 --- a/sakura-server/minecraft-patches/features/0007-Store-Entity-Data-State.patch +++ b/sakura-server/minecraft-patches/features/0007-Store-Entity-Data-State.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Store Entity Data/State diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index b94c17c87628f2ff3aae700f731e7fa5160ed799..437d10c650f5aea171f2ea0d075f140d7f3cb058 100644 +index 3c638e9039a037d20c008f22f0c5bace3d3493c6..cffd3f64b253dba53eacc60c8ae82dd297f98e5b 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -530,6 +530,21 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -534,6 +534,21 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return flags; } // Sakura end - load chunks on movement @@ -31,7 +31,7 @@ index b94c17c87628f2ff3aae700f731e7fa5160ed799..437d10c650f5aea171f2ea0d075f140d public Entity(EntityType entityType, Level level) { this.type = entityType; diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java -index 8aea98378fccb14f3eadab72a38e5661806b96c0..e704f4a84167c0cfe5afd99c5f24f6c24d3e4db1 100644 +index 0e676210ef390e3cce2fc24622f68da119c9a05f..7bf2b9a5a6c0a5c78e8623e158367552eb253fbc 100644 --- a/net/minecraft/world/level/Level.java +++ b/net/minecraft/world/level/Level.java @@ -1498,6 +1498,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl diff --git a/sakura-server/minecraft-patches/features/0008-Merge-Cannon-Entities.patch b/sakura-server/minecraft-patches/features/0008-Merge-Cannon-Entities.patch index a9b77f3..6b25ae1 100644 --- a/sakura-server/minecraft-patches/features/0008-Merge-Cannon-Entities.patch +++ b/sakura-server/minecraft-patches/features/0008-Merge-Cannon-Entities.patch @@ -41,10 +41,10 @@ index c5fffb6ca4ef4d447e4eb668e8980fe0885d99da..939264c895f452e909cfbff19eced2cf this.guardEntityTick(this::tickNonPassenger, entity); profilerFiller.pop(); diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index d1d39737e4001b103e6412983ff6a4761b32c432..549e5bd413ca17d1b79c1e4b57faeb368325d99d 100644 +index cffd3f64b253dba53eacc60c8ae82dd297f98e5b..68e2b26835a2588a047e9ea175eb8e4912041976 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -545,6 +545,27 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -549,6 +549,27 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return to.entityState() != null && to.entityState().comparePositionAndMotion(this); } // Sakura end - store entity data/state @@ -72,7 +72,7 @@ index d1d39737e4001b103e6412983ff6a4761b32c432..549e5bd413ca17d1b79c1e4b57faeb36 public Entity(EntityType entityType, Level level) { this.type = entityType; -@@ -4947,6 +4968,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4951,6 +4972,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess if (this.removalReason != Entity.RemovalReason.UNLOADED_TO_CHUNK) { this.getPassengers().forEach(Entity::stopRiding); } // Paper - rewrite chunk system this.levelCallback.onRemove(removalReason); this.onRemoval(removalReason); @@ -272,7 +272,7 @@ index 0fbac85dd7b624899db3825149a5d2b167ecedaa..13fdcee0437695ae22180c6091b7aa72 @Nullable diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java -index e704f4a84167c0cfe5afd99c5f24f6c24d3e4db1..37271a9e9d3d16a01c437629806508accefa1b9c 100644 +index 7bf2b9a5a6c0a5c78e8623e158367552eb253fbc..b5e9a92ddb789344650a0c5c10ffec6db5f90035 100644 --- a/net/minecraft/world/level/Level.java +++ b/net/minecraft/world/level/Level.java @@ -828,6 +828,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl diff --git a/sakura-server/minecraft-patches/features/0012-Optimise-cannon-entity-movement.patch b/sakura-server/minecraft-patches/features/0012-Optimise-cannon-entity-movement.patch index 2cc29ca..f05b0af 100644 --- a/sakura-server/minecraft-patches/features/0012-Optimise-cannon-entity-movement.patch +++ b/sakura-server/minecraft-patches/features/0012-Optimise-cannon-entity-movement.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Optimise cannon entity movement diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 4c4a662306b698112242775f9701902b70e3ae85..f7ba5db617582b16c5d101259dc60349fcdadd22 100644 +index 68e2b26835a2588a047e9ea175eb8e4912041976..98107921d7251e1b7fc621103a31afdfd3bb5af7 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -1165,7 +1165,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1169,7 +1169,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess Vec3 vec3 = this.collide(movement); double d = vec3.lengthSqr(); if (d > 1.0E-7 || movement.lengthSqr() - d < 1.0E-7) { @@ -17,7 +17,7 @@ index 4c4a662306b698112242775f9701902b70e3ae85..f7ba5db617582b16c5d101259dc60349 BlockHitResult blockHitResult = this.level() .clip( new ClipContext(this.position(), this.position().add(vec3), ClipContext.Block.FALLDAMAGE_RESETTING, ClipContext.Fluid.WATER, this) -@@ -1506,6 +1506,131 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1510,6 +1510,131 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return distance; } @@ -150,7 +150,7 @@ index 4c4a662306b698112242775f9701902b70e3ae85..f7ba5db617582b16c5d101259dc60349 protected Vec3 collide(Vec3 movement) { final boolean xZero = movement.x == 0.0; diff --git a/net/minecraft/world/entity/item/FallingBlockEntity.java b/net/minecraft/world/entity/item/FallingBlockEntity.java -index eb2ce73058f9f95989a40ead9c215f07efcb5c18..767bcc16b79d1a82fc9a73ab7b022c84aa66ede3 100644 +index 6f0b77e77186dd394b5949977e3e1a66610bc354..0dc8c7a74df21e10d3eec66682d5efc61b335e61 100644 --- a/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/net/minecraft/world/entity/item/FallingBlockEntity.java @@ -121,6 +121,12 @@ public class FallingBlockEntity extends Entity implements me.samsuik.sakura.enti diff --git a/sakura-server/minecraft-patches/features/0017-Configure-cannon-physics.patch b/sakura-server/minecraft-patches/features/0017-Configure-cannon-physics.patch index 12b4142..089953b 100644 --- a/sakura-server/minecraft-patches/features/0017-Configure-cannon-physics.patch +++ b/sakura-server/minecraft-patches/features/0017-Configure-cannon-physics.patch @@ -67,10 +67,10 @@ index 44aaaa87d63a2a2287f89feaa431ca0e80da3dab..194db5ff2a473b10fded4491c1173d42 if (xSmaller && z != 0.0) { z = performAABBCollisionsZ(axisalignedbb, z, aabbs); diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index f7ba5db617582b16c5d101259dc60349fcdadd22..10c0bb5d1d88500e0002a726401a18313f5b3aaa 100644 +index 98107921d7251e1b7fc621103a31afdfd3bb5af7..162062200a4ffa7bc669093779377f0d8d83172e 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -566,6 +566,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -570,6 +570,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } } // Sakura end - merge cannon entities @@ -84,7 +84,7 @@ index f7ba5db617582b16c5d101259dc60349fcdadd22..10c0bb5d1d88500e0002a726401a1831 public Entity(EntityType entityType, Level level) { this.type = entityType; -@@ -1085,7 +1092,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1089,7 +1096,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } protected void checkSupportingBlock(boolean onGround, @Nullable Vec3 movement) { @@ -93,7 +93,7 @@ index f7ba5db617582b16c5d101259dc60349fcdadd22..10c0bb5d1d88500e0002a726401a1831 AABB boundingBox = this.getBoundingBox(); AABB aabb = new AABB(boundingBox.minX, boundingBox.minY - 1.0E-6, boundingBox.minZ, boundingBox.maxX, boundingBox.minY, boundingBox.maxZ); Optional optional = this.level.findSupportingBlock(this, aabb); -@@ -1135,7 +1142,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1139,7 +1146,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess if (this.noPhysics) { this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z); } else { @@ -105,7 +105,7 @@ index f7ba5db617582b16c5d101259dc60349fcdadd22..10c0bb5d1d88500e0002a726401a1831 // Paper start - EAR 2 this.activatedTick = Math.max(this.activatedTick, MinecraftServer.currentTick + 20); this.activatedImmunityTick = Math.max(this.activatedImmunityTick, MinecraftServer.currentTick + 20); -@@ -1164,8 +1174,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1168,8 +1178,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess movement = this.maybeBackOffFromEdge(movement, type); Vec3 vec3 = this.collide(movement); double d = vec3.lengthSqr(); @@ -118,7 +118,7 @@ index f7ba5db617582b16c5d101259dc60349fcdadd22..10c0bb5d1d88500e0002a726401a1831 BlockHitResult blockHitResult = this.level() .clip( new ClipContext(this.position(), this.position().add(vec3), ClipContext.Block.FALLDAMAGE_RESETTING, ClipContext.Fluid.WATER, this) -@@ -1219,6 +1231,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1223,6 +1235,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } else { if (this.horizontalCollision) { Vec3 deltaMovement = this.getDeltaMovement(); @@ -131,7 +131,7 @@ index f7ba5db617582b16c5d101259dc60349fcdadd22..10c0bb5d1d88500e0002a726401a1831 this.setDeltaMovement(flag ? 0.0 : deltaMovement.x, deltaMovement.y, flag1 ? 0.0 : deltaMovement.z); } -@@ -1535,7 +1553,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1539,7 +1557,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess bb = currBoundingBox.expandTowards(movement.x, movement.y, movement.z); } this.collectCollisions(bb, voxelList, bbList, ca.spottedleaf.moonrise.patches.collisions.CollisionUtil.COLLISION_FLAG_CHECK_BORDER); @@ -140,7 +140,7 @@ index f7ba5db617582b16c5d101259dc60349fcdadd22..10c0bb5d1d88500e0002a726401a1831 } private Vec3 collideAxisScan(Vec3 movement, AABB currBoundingBox, List voxelList, List bbList) { -@@ -1543,7 +1561,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1547,7 +1565,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess double y = movement.y; double z = movement.z; @@ -152,7 +152,7 @@ index f7ba5db617582b16c5d101259dc60349fcdadd22..10c0bb5d1d88500e0002a726401a1831 if (y != 0.0) { y = this.scanY(currBoundingBox, y, voxelList, bbList); -@@ -1665,7 +1686,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1669,7 +1690,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess ca.spottedleaf.moonrise.patches.collisions.CollisionUtil.COLLISION_FLAG_CHECK_BORDER | this.getExtraCollisionFlags(), null // Sakura - load chunks on movement ); potentialCollisionsBB.addAll(entityAABBs); @@ -161,7 +161,7 @@ index f7ba5db617582b16c5d101259dc60349fcdadd22..10c0bb5d1d88500e0002a726401a1831 final boolean collidedX = collided.x != movement.x; final boolean collidedY = collided.y != movement.y; -@@ -1791,11 +1812,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1795,11 +1816,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess for (Entity.Movement movement : movements) { Vec3 vec3 = movement.from(); Vec3 vec31 = movement.to(); diff --git a/sakura-server/minecraft-patches/features/0019-Collide-with-non-solid-blocks.patch b/sakura-server/minecraft-patches/features/0019-Collide-with-non-solid-blocks.patch index 8c62fd3..e60a98c 100644 --- a/sakura-server/minecraft-patches/features/0019-Collide-with-non-solid-blocks.patch +++ b/sakura-server/minecraft-patches/features/0019-Collide-with-non-solid-blocks.patch @@ -46,10 +46,10 @@ index 194db5ff2a473b10fded4491c1173d420f46424d..c09658eb8c2824ac0c887f94771d9b46 blockCollision = blockData.getCollisionShape(world, mutablePos, collisionShape); } diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 10c0bb5d1d88500e0002a726401a18313f5b3aaa..47ecc1ed0170e24b41b0a010307cc2bcab339a3a 100644 +index 162062200a4ffa7bc669093779377f0d8d83172e..d61ac5aae3deb9bd145787351fb85051d4ff1aed 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -527,6 +527,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -531,6 +531,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess flags |= ca.spottedleaf.moonrise.patches.collisions.CollisionUtil.COLLISION_FLAG_ADD_TICKET; } diff --git a/sakura-server/minecraft-patches/features/0022-Add-entity-travel-distance-limits.patch b/sakura-server/minecraft-patches/features/0022-Add-entity-travel-distance-limits.patch index 0fd8fec..7f41afa 100644 --- a/sakura-server/minecraft-patches/features/0022-Add-entity-travel-distance-limits.patch +++ b/sakura-server/minecraft-patches/features/0022-Add-entity-travel-distance-limits.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add entity travel distance limits diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index effdd0e1382fc59b9d8a709c18a652fbd4e94e6d..8f17606889b767539c19015ae7f1cb7795616b88 100644 +index b9806bdd4d49ed3fd8c17125143703b6a792b10e..4b3ee01e9dac634941b6cfb0cab43ba1b9069fc9 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java @@ -1295,6 +1295,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe @@ -21,10 +21,10 @@ index effdd0e1382fc59b9d8a709c18a652fbd4e94e6d..8f17606889b767539c19015ae7f1cb77 } else {entity.inactiveTick();} // Paper - EAR 2 profilerFiller.pop(); diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 47ecc1ed0170e24b41b0a010307cc2bcab339a3a..06e919ddb07faa72721fd5660895abb3ad749dee 100644 +index d61ac5aae3deb9bd145787351fb85051d4ff1aed..ffe5ad8f3936386fd1fa2b961837fbea5c230407 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -581,6 +581,19 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -585,6 +585,19 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return this.physics; } // Sakura end - configure cannon physics @@ -44,7 +44,7 @@ index 47ecc1ed0170e24b41b0a010307cc2bcab339a3a..06e919ddb07faa72721fd5660895abb3 public Entity(EntityType entityType, Level level) { this.type = entityType; -@@ -610,6 +623,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -614,6 +627,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.setPos(0.0, 0.0, 0.0); this.eyeHeight = this.dimensions.eyeHeight(); this.despawnTime = level == null || type == EntityType.PLAYER ? -1 : level.paperConfig().entities.spawning.despawnTime.getOrDefault(type, io.papermc.paper.configuration.type.number.IntOr.Disabled.DISABLED).or(-1); // Paper - entity despawn time limit diff --git a/sakura-server/minecraft-patches/features/0024-Configurable-left-shooting-and-adjusting-limits.patch b/sakura-server/minecraft-patches/features/0024-Configurable-left-shooting-and-adjusting-limits.patch index 2039ec1..7ab3d57 100644 --- a/sakura-server/minecraft-patches/features/0024-Configurable-left-shooting-and-adjusting-limits.patch +++ b/sakura-server/minecraft-patches/features/0024-Configurable-left-shooting-and-adjusting-limits.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable left shooting and adjusting limits diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 06e919ddb07faa72721fd5660895abb3ad749dee..f02b6dbdfaadbbbe3d4328b77fbd29cf26406946 100644 +index ffe5ad8f3936386fd1fa2b961837fbea5c230407..6eaef984b71881bc04f835d4773f18b754e2fcd4 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -594,6 +594,46 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -598,6 +598,46 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return Math.max(x, z) >= this.travelDistanceLimit; } // Sakura end - entity travel distance limits @@ -55,7 +55,7 @@ index 06e919ddb07faa72721fd5660895abb3ad749dee..f02b6dbdfaadbbbe3d4328b77fbd29cf public Entity(EntityType entityType, Level level) { this.type = entityType; -@@ -1596,6 +1636,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1600,6 +1640,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } if (xSmaller && z != 0.0) { @@ -63,7 +63,7 @@ index 06e919ddb07faa72721fd5660895abb3ad749dee..f02b6dbdfaadbbbe3d4328b77fbd29cf z = this.scanZ(currBoundingBox, z, voxelList, bbList); if (z != 0.0) { currBoundingBox = ca.spottedleaf.moonrise.patches.collisions.CollisionUtil.offsetZ(currBoundingBox, z); -@@ -1603,6 +1644,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1607,6 +1648,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } if (x != 0.0) { diff --git a/sakura-server/minecraft-patches/features/0027-Optimise-check-inside-blocks-and-traverse-blocks.patch b/sakura-server/minecraft-patches/features/0027-Optimise-check-inside-blocks-and-traverse-blocks.patch index 7ccfa44..ae3ead4 100644 --- a/sakura-server/minecraft-patches/features/0027-Optimise-check-inside-blocks-and-traverse-blocks.patch +++ b/sakura-server/minecraft-patches/features/0027-Optimise-check-inside-blocks-and-traverse-blocks.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Optimise check inside blocks and traverse blocks diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index f02b6dbdfaadbbbe3d4328b77fbd29cf26406946..bb7b919f3005deeb1cde5748bd3987ccba59c16b 100644 +index 6eaef984b71881bc04f835d4773f18b754e2fcd4..f5e3f2e066e257bc791254e3bf7ff6659c077d09 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -1876,6 +1876,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1880,6 +1880,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess private void checkInsideBlocks(List movements, InsideBlockEffectApplier.StepBasedCollector stepBasedCollector) { if (this.isAffectedByBlocks()) { LongSet set = this.visitedBlocks; @@ -16,7 +16,7 @@ index f02b6dbdfaadbbbe3d4328b77fbd29cf26406946..bb7b919f3005deeb1cde5748bd3987cc for (Entity.Movement movement : movements) { Vec3 vec3 = movement.from(); -@@ -1891,7 +1892,20 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1895,7 +1896,20 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.physics, // Sakura - configure cannon physics (pos, step) -> { if (this.isAlive()) { diff --git a/sakura-server/minecraft-patches/sources/net/minecraft/world/entity/Entity.java.patch b/sakura-server/minecraft-patches/sources/net/minecraft/world/entity/Entity.java.patch index 0bb588a..964140b 100644 --- a/sakura-server/minecraft-patches/sources/net/minecraft/world/entity/Entity.java.patch +++ b/sakura-server/minecraft-patches/sources/net/minecraft/world/entity/Entity.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -511,6 +_,7 @@ +@@ -515,6 +_,7 @@ } } // Paper end - optimise entity tracker @@ -8,7 +8,7 @@ public Entity(EntityType entityType, Level level) { this.type = entityType; -@@ -4003,7 +_,7 @@ +@@ -4007,7 +_,7 @@ } public boolean isPushedByFluid() {