geforkt von Mirrors/Paper
SPIGOT-1864: Improve entity collision capping
Dieser Commit ist enthalten in:
Ursprung
df381276dc
Commit
443691d22d
@ -1,4 +1,4 @@
|
||||
From f73e433875bdfd641eb692c35fc1d2b5b0dc58ee Mon Sep 17 00:00:00 2001
|
||||
From ad6c13b9c1bb38bcff74e3e4742e4afd63c72fd6 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Fri, 31 Jan 2014 11:18:34 -0500
|
||||
Subject: [PATCH] Cap Entity Collisions
|
||||
@ -19,7 +19,7 @@ index f1d7dc5..f6bec63 100644
|
||||
|
||||
public Entity(World world) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 12d858a..0a75123 100644
|
||||
index 12d858a..8e8a29b 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -1966,7 +1966,8 @@ public abstract class EntityLiving extends Entity {
|
||||
@ -27,7 +27,7 @@ index 12d858a..0a75123 100644
|
||||
|
||||
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?
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren