SPIGOT-593: Fix a mistake with the EntitySlice patch

This commit is contained in:
Thinkofdeath 2015-02-20 16:39:04 +00:00 committed by Zach Brown
parent c39bee77cc
commit 0b3670b5a1

View file

@ -1,11 +1,11 @@
From d55a99d4957f228f5a5a19e6fd3b4772d034af38 Mon Sep 17 00:00:00 2001 From 853d24c50d7ba15fafb7303e5a7d826659556392 Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net> From: md_5 <git@md-5.net>
Date: Fri, 20 Feb 2015 21:33:36 +1100 Date: Fri, 20 Feb 2015 21:33:36 +1100
Subject: [PATCH] Use Standard List for EntitySlices. Subject: [PATCH] Use Standard List for EntitySlices.
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index c50ab45..e9cd4d4 100644 index c50ab45..b76b446 100644
--- a/src/main/java/net/minecraft/server/Chunk.java --- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -31,7 +31,7 @@ public class Chunk { @@ -31,7 +31,7 @@ public class Chunk {
@ -45,7 +45,7 @@ index c50ab45..e9cd4d4 100644
Entity entity = (Entity) iterator.next(); Entity entity = (Entity) iterator.next();
- if (entity.getBoundingBox().b(axisalignedbb) && (predicate == null || predicate.apply(entity))) { - if (entity.getBoundingBox().b(axisalignedbb) && (predicate == null || predicate.apply(entity))) {
+ if (entity.getClass().isAssignableFrom(oclass) && entity.getBoundingBox().b(axisalignedbb) && (predicate == null || predicate.apply(entity))) { // Spigot + if (oclass.isInstance(entity) && entity.getBoundingBox().b(axisalignedbb) && (predicate == null || predicate.apply(entity))) { // Spigot
list.add(entity); list.add(entity);
} }
} }