mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
SPIGOT-1864: Improve entity collision capping
This commit is contained in:
parent
f91b836282
commit
c81789f27e
1 changed files with 1 additions and 1 deletions
|
@ -27,7 +27,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
if (this.isInteractable() && !list.isEmpty()) { // Spigot: Add isInteractable() condition
|
||||
- for (int i = 0; i < list.size(); ++i) {
|
||||
+ numCollisions -= world.spigotConfig.maxCollisionsPerEntity; // Spigot
|
||||
+ numCollisions = Math.max(0, numCollisions - world.spigotConfig.maxCollisionsPerEntity); // Spigot
|
||||
+ for (int i = 0; i < list.size() && numCollisions < world.spigotConfig.maxCollisionsPerEntity; ++i) {
|
||||
Entity entity = (Entity) list.get(i);
|
||||
// TODO better check now?
|
||||
|
|
Loading…
Reference in a new issue