3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 04:20:08 +01:00

SPIGOT-1994: Revert collisions to Vanilla behaviour

Dieser Commit ist enthalten in:
md_5 2016-07-10 11:44:02 +10:00
Ursprung 02d704b55a
Commit 54902261c1

Datei anzeigen

@ -528,21 +528,7 @@
this.setFlag(7, flag); this.setFlag(7, flag);
} }
@@ -1749,6 +2008,13 @@ @@ -1824,11 +2083,11 @@
if (!list.isEmpty()) {
for (int i = 0; i < list.size(); ++i) {
Entity entity = (Entity) list.get(i);
+ // TODO better check now?
+ // CraftBukkit start - Only handle mob (non-player) collisions every other tick
+ if (entity instanceof EntityLiving && !(this instanceof EntityPlayer) && this.ticksLived % 2 == 0) {
+ continue;
+ }
+ // CraftBukkit end
+
this.C(entity);
}
@@ -1824,11 +2090,11 @@
} }
public boolean isInteractable() { public boolean isInteractable() {
@ -556,7 +542,7 @@
} }
protected void ap() { protected void ap() {
@@ -1965,7 +2231,22 @@ @@ -1965,7 +2224,22 @@
protected void v() { protected void v() {
if (this.bo != null && this.cx()) { if (this.bo != null && this.cx()) {
this.a(this.bo, 16); this.a(this.bo, 16);
@ -580,7 +566,7 @@
if (itemstack != null && itemstack.count == 0) { if (itemstack != null && itemstack.count == 0) {
itemstack = null; itemstack = null;
@@ -2051,10 +2332,18 @@ @@ -2051,10 +2325,18 @@
} }
if (flag1) { if (flag1) {