summaryrefslogtreecommitdiffstats
path: root/nms-patches
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-03-26 09:19:03 +1100
committermd_5 <git@md-5.net>2016-03-26 09:19:10 +1100
commit99f22a5c59dac803c7002ea176520c9cd91b8c35 (patch)
treefaffb2c1201158714f0c471940434653af8d3bfb /nms-patches
parent6030bc464fd216b54904b43f4cf2bfddb4efc74d (diff)
downloadcraftbukkit-99f22a5c59dac803c7002ea176520c9cd91b8c35.tar
craftbukkit-99f22a5c59dac803c7002ea176520c9cd91b8c35.tar.gz
craftbukkit-99f22a5c59dac803c7002ea176520c9cd91b8c35.tar.lz
craftbukkit-99f22a5c59dac803c7002ea176520c9cd91b8c35.tar.xz
craftbukkit-99f22a5c59dac803c7002ea176520c9cd91b8c35.zip
SPIGOT-2050: Add back code to only fire VehicleEnterEvent for loaded chunks.
Diffstat (limited to 'nms-patches')
-rw-r--r--nms-patches/Entity.patch2
1 files changed, 1 insertions, 1 deletions
diff --git a/nms-patches/Entity.patch b/nms-patches/Entity.patch
index 8c12da1b..847f1793 100644
--- a/nms-patches/Entity.patch
+++ b/nms-patches/Entity.patch
@@ -381,7 +381,7 @@
+
+ CraftEntity craft = (CraftEntity) entity.getBukkitEntity().getVehicle();
+ Entity orig = craft == null ? null : craft.getHandle();
-+ if (getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) {
++ if (getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity && entity.world.isChunkLoaded((int) entity.locX >> 4, (int) entity.locZ >> 4, false)) { // Boolean not used
+ VehicleEnterEvent event = new VehicleEnterEvent(
+ (Vehicle) getBukkitEntity(),
+ entity.getBukkitEntity()