summaryrefslogtreecommitdiffstats
path: root/nms-patches/BlockEnderPortal.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/BlockEnderPortal.patch')
-rw-r--r--nms-patches/BlockEnderPortal.patch6
1 files changed, 3 insertions, 3 deletions
diff --git a/nms-patches/BlockEnderPortal.patch b/nms-patches/BlockEnderPortal.patch
index 8f130a95..0e141d99 100644
--- a/nms-patches/BlockEnderPortal.patch
+++ b/nms-patches/BlockEnderPortal.patch
@@ -6,13 +6,13 @@
+import org.bukkit.event.entity.EntityPortalEnterEvent; // CraftBukkit
+
- public class BlockEnderPortal extends BlockContainer {
+ public class BlockEnderPortal extends BlockTileEntity {
- protected BlockEnderPortal(Material material) {
+ protected static final AxisAlignedBB a = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.75D, 1.0D);
@@ -36,6 +38,10 @@
public void a(World world, BlockPosition blockposition, IBlockData iblockdata, Entity entity) {
- if (entity.vehicle == null && entity.passenger == null && !world.isClientSide) {
+ if (!entity.isPassenger() && !entity.isVehicle() && entity.aV() && !world.isClientSide && entity.getBoundingBox().b(iblockdata.c(world, blockposition).a(blockposition))) {
+ // CraftBukkit start - Entity in portal
+ EntityPortalEnterEvent event = new EntityPortalEnterEvent(entity.getBukkitEntity(), new org.bukkit.Location(world.getWorld(), blockposition.getX(), blockposition.getY(), blockposition.getZ()));
+ world.getServer().getPluginManager().callEvent(event);