From 99f22a5c59dac803c7002ea176520c9cd91b8c35 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 26 Mar 2016 09:19:03 +1100 Subject: [PATCH] SPIGOT-2050: Add back code to only fire VehicleEnterEvent for loaded chunks. --- nms-patches/Entity.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nms-patches/Entity.patch b/nms-patches/Entity.patch index 8c12da1b1a..847f179339 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()