mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-23 08:49:25 +00:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@52a0590 Updated Upstream (Bukkit/CraftBukkit) (#11543) PaperMC/Paper@5c0930d Fix fix recipe iterator patch PaperMC/Paper@1de0130 re-add a dispense fix patch PaperMC/Paper@16d7d73 bunch more general fixes PaperMC/Paper@a5d7426 Correctly support RecipeChoice.empty (#11550) PaperMC/Paper@85c870e Correct update cursor (#11554) PaperMC/Paper@d19be64 Fix NPE with spark when CraftServer is not init yet (#11558) PaperMC/Paper@92131ad Decrease dead entity teleport warning (#11559) PaperMC/Paper@a6df4c8 Handle corrupt light data gracefully PaperMC/Paper@ce0a041 [ci skip] Rebuild patches PaperMC/Paper@c6aa61e Updated Upstream (Bukkit/CraftBukkit/Spigot) (#11561) PaperMC/Paper@93b435d [ci skip] better instructions for patch apply conflict (#11568) PaperMC/Paper@42a1901 Correctly adopt upstream item EAR fix (#11582) PaperMC/Paper@fcb6c72 Correctly pass velocity native compressor (#11509) PaperMC/Paper@99f4bb2 Fix infinite fireworks (#11592) (#11594)
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 e86314de8d908a0c3e9f17d3e163c11180cf3f59..799250a0b2056743fde37d28a032f15ad1850d49 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
@@ -3767,7 +3767,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
|