mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-22 00:09:20 +00:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@00ef8bd Fix Entity#isTicking and update Paper entity command (#11590) PaperMC/Paper@6483ecb Updated Upstream (Bukkit/CraftBukkit) PaperMC/Paper@17dbf74 Improve CraftEntity and CraftPlayer equals PaperMC/Paper@0af4e84 [ci skip] Add identifying line to some larger/optimization patches PaperMC/Paper@bcbd108 Call CraftPlayer#onEntityRemove for all online players (#11598) PaperMC/Paper@e47f79a Configure mockito agent (#11560) PaperMC/Paper@94ea770 Re-add exact choice shapeless support (#11546) PaperMC/Paper@2e6eafb Improve Minecart#getMinecartMaterial (#11544) PaperMC/Paper@9d1c91d [ci skip] Fix UseCooldownComponent jd (#11565) PaperMC/Paper@59b79c8 Fix NPE with enchantable (#11557) PaperMC/Paper@6da7b9e Update Eigencraft patch to 1.21.3 (#11553) PaperMC/Paper@1ef4c0e Improve performance of RecipeMap#removeRecipe (#11547) PaperMC/Paper@52fb265 Optimize custom map rendering (#11000) PaperMC/Paper@661839e Fix and optimize getChunkCount (#11610) PaperMC/Paper@c60af44 Fix experimental minecart collisions on sloped rails PaperMC/Paper@13f48d8 [ci skip] Rebuild patches PaperMC/Paper@be886cf Fix Naming issue inside Add PlayerArmorChangeEvent (#11614) PaperMC/Paper@7b13d93 Updated Upstream (Bukkit/CraftBukkit) (#11626) PaperMC/Paper@4e2291e chore: refactor issue templates PaperMC/Paper@bc4a705 [ci skip] chore: change paste.gg links to mclo.gs (#11629) PaperMC/Paper@3480489 Update Alternate Current patch to 1.21.3 (#11602) PaperMC/Paper@575c1c4 Update disableGameRuleLimits casing PaperMC/Paper@11d708d [ci skip] Add missing feature patch identifiers PaperMC/Paper@daf3113 Make logs less annoying PaperMC/Paper@4e01ede Fix inverted global skip check PaperMC/Paper@d8b66dd fix: move to jline-terminal-ffm on java 22+ and fall back to jni on 21, fixes #10405 PaperMC/Paper@6735c60 Fix enderchest opening animation (#11635) PaperMC/Paper@de6173b Item DataComponent API (#10845) PaperMC/Paper@8c5b837 Rework async chunk api implementation PaperMC/Paper@37b9630 Do not create unneccessary callback in ChunkTaskScheduler#scheduleChunkLoad PaperMC/Paper@878da16 Fix non block ticking chunks not sending block/light updates PaperMC/Paper@fdef6d3 Add missing NotNull annotation for getChunksAtAsync cb param PaperMC/Paper@01dd50f [ci skip] Rebuild patches PaperMC/Paper@f9f964d Fix drops for shearing bogged (#11628) PaperMC/Paper@21cc763 Fix drops for shearing mushroom cow (#11632) PaperMC/Paper@57eab3e Add PlayerItemGroupCooldownEvent (#11625) PaperMC/Paper@d0dcd7d Fix incorrect invulnerability damage reduction (#11599) PaperMC/Paper@85bfdc0 Fix NPE when EntityResurrectEvent is uncancelled (#11636) PaperMC/Paper@c28d89d Update spark PaperMC/Paper@55475f0 [ci skip] Fix typos PaperMC/Paper@f8e2a67 Check for AbstractBoat instead of Boat in EAR ignore list
25 lines
1.7 KiB
Diff
25 lines
1.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Samsuik <kfian294ma4@gmail.com>
|
|
Date: Thu, 23 Sep 2021 18:50:13 +0100
|
|
Subject: [PATCH] Optimise LivingEntity#pushEntities
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
index f36a075dbee2b96d01899e02460b1d8443e91749..e6b6987b46294a96f10d3aa56e8bdc4e25a4c9bf 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
@@ -3789,7 +3789,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
|
return;
|
|
}
|
|
// Paper end - don't run getEntities if we're not going to use its result
|
|
- List list = this.level().getEntities((Entity) this, this.getBoundingBox(), EntitySelector.pushable(this, this.level().paperConfig().collisions.fixClimbingBypassingCrammingRule)); // Paper - Climbing should not bypass cramming gamerule
|
|
+ // Sakura start - use maxEntityCollision limit for entity retrieval
|
|
+ int limit = Math.max(i, this.level().paperConfig().collisions.maxEntityCollisions);
|
|
+ int search = limit * limit;
|
|
+ List<Entity> list = new ArrayList<>();
|
|
+ this.level().getEntities(null, this.getBoundingBox(), EntitySelector.pushable(this, this.level().paperConfig().collisions.fixClimbingBypassingCrammingRule), list, limit, search); // Paper - Climbing should not bypass cramming gamerule
|
|
+ // Sakura end - use maxEntityCollision limit for entity retrieval
|
|
|
|
if (!list.isEmpty()) {
|
|
// Paper - don't run getEntities if we're not going to use its result; moved up
|