@@ -1,4 +1,4 @@
|
||||
From 30fb5b96bffa2427581a8544d73ea1960b076cf8 Mon Sep 17 00:00:00 2001
|
||||
From 21601386ee449ed1a1cf00959ee6ea63f6049c37 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
|
||||
@@ -7,7 +7,7 @@ Limit a single entity to colliding a max of configurable times per tick.
|
||||
This will alleviate issues where living entities are hoarded in 1x1 pens.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 69331ff..4d09fdb 100644
|
||||
index 0ec07c2..c049cd8 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -1021,6 +1021,7 @@ public abstract class Entity {
|
||||
@@ -19,10 +19,10 @@ index 69331ff..4d09fdb 100644
|
||||
if (entity.passenger != this && entity.vehicle != this) {
|
||||
double d0 = entity.locX - this.locX;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 35b2f75..ab28bd3 100644
|
||||
index c04ff95..7ec500e 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -1486,7 +1486,9 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -1491,7 +1491,9 @@ public abstract class EntityLiving extends Entity {
|
||||
List list = this.world.getEntities(this, this.boundingBox.grow(0.20000000298023224D, 0.0D, 0.20000000298023224D));
|
||||
|
||||
if (this.R() && list != null && !list.isEmpty()) { // Spigot: Add this.R() condition
|
||||
@@ -32,13 +32,13 @@ index 35b2f75..ab28bd3 100644
|
||||
Entity entity = (Entity) list.get(i);
|
||||
|
||||
// TODO better check now?
|
||||
@@ -1497,9 +1499,12 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -1502,9 +1504,12 @@ public abstract class EntityLiving extends Entity {
|
||||
// CraftBukkit end
|
||||
|
||||
if (entity.S()) {
|
||||
if (entity.R()) {
|
||||
+ entity.numCollisions++; // Spigot
|
||||
+ numCollisions++; // Spigot
|
||||
this.n(entity);
|
||||
this.o(entity);
|
||||
}
|
||||
}
|
||||
+ numCollisions = 0; // Spigot
|
||||
@@ -62,5 +62,5 @@ index 1290829..b12a086 100644
|
||||
+ }
|
||||
}
|
||||
--
|
||||
1.8.3.2
|
||||
1.8.5.2.msysgit.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user