mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-19 14:59:30 +00:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@5e2a3bc Call EntityChangeBlockEvent with correct block when waxing (#12154) PaperMC/Paper@ab984a0 Always pass event block to damage source (#12158) PaperMC/Paper@7b4d44f Revert "Always pass event block to damage source (#12158)" PaperMC/Paper@e5a8ee8 Hide soul speed particles for vanished players (#12152) PaperMC/Paper@fcb2e81 Clear lastSection on game event listener removal PaperMC/Paper@636ae0c Add missing Paper comments to player movement patch PaperMC/Paper@9be4e07 Pin snapshot dependencies (#12185) PaperMC/Paper@f12d33f Track codec writing PaperMC/Paper@1d9b399 Add config option for failed beehive release cooldowns (#12186) PaperMC/Paper@5f2ee83 Fix first execution of async delayed/repeating tasks being sync (#12166) PaperMC/Paper@b00875f Add a method on Registry to get the size (#12182) PaperMC/Paper@ca26109 Don't process empty rcon commands (#12188) PaperMC/Paper@a501c45 Deprecate server config getters (#12189) PaperMC/Paper@7f3d359 Use MiniMessage#deserialize(String, Pointered) in sendRichMessage for send messages (#12177) PaperMC/Paper@9b9f046 Remove broken code (#12171) PaperMC/Paper@fc56c72 Add methods for Creaking (#12094) PaperMC/Paper@f63dbea Fix cancelled HangingPlaceEvent inventory desync (#12161) PaperMC/Paper@9421f22 Make CustomArgumentType use parse(reader,source) (#12191) PaperMC/Paper@0a6e743 Fix invulnerability damage and armour (#12190) PaperMC/Paper@b506626 Remove unused light queue size option (#12201) PaperMC/Paper@1d5e5a5 Document replacement for Skull owner profile methods (#12195) PaperMC/Paper@8de7e35 Add null check to level ref in Entity constructor (#12218) PaperMC/Paper@a866e36 Fix MenuType.SMITHING JavaDocs (#12226) PaperMC/Paper@5538d24 Fix "DEFAULT" SpawnReason of fish spawned by bucket (#12227)
29 lines
1.9 KiB
Diff
29 lines
1.9 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] Use maxEntityCollision limit for entity retrieval
|
|
|
|
|
|
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
|
index 430fefb29456dab44241d40c470ebef5fa25bb4b..647dbf5a268250c7b1c3824089dd11f6e1cec37c 100644
|
|
--- a/net/minecraft/world/entity/LivingEntity.java
|
|
+++ b/net/minecraft/world/entity/LivingEntity.java
|
|
@@ -3664,7 +3664,16 @@ 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<Entity> entities = this.level().getEntities(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(_int, this.level().paperConfig().collisions.maxEntityCollisions);
|
|
+ int search = limit * limit;
|
|
+ List<Entity> entities = new ArrayList<>();
|
|
+ this.level().getEntities(
|
|
+ EntityTypeTest.forClass(Entity.class), this.getBoundingBox(),
|
|
+ EntitySelector.pushable(this, this.level().paperConfig().collisions.fixClimbingBypassingCrammingRule), // Paper - Climbing should not bypass cramming gamerule
|
|
+ entities, limit, search
|
|
+ );
|
|
+ // Sakura end - use maxEntityCollision limit for entity retrieval
|
|
if (!entities.isEmpty()) {
|
|
// Paper - don't run getEntities if we're not going to use its result; moved up
|
|
if (_int > 0 && entities.size() > _int - 1 && this.random.nextInt(4) == 0) {
|