2019-07-20 06:01:24 +02:00
|
|
|
From d131147b250b5d04ac47721128a5af05f3f32a3a Mon Sep 17 00:00:00 2001
|
2018-06-09 15:21:40 +02:00
|
|
|
From: Shane Freeder <theboyetronic@gmail.com>
|
2018-06-13 23:29:49 +02:00
|
|
|
Date: Sat, 9 Jun 2018 14:08:39 +0200
|
2018-06-09 15:21:40 +02:00
|
|
|
Subject: [PATCH] Implement EntityTeleportEndGatewayEvent
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/TileEntityEndGateway.java b/src/main/java/net/minecraft/server/TileEntityEndGateway.java
|
2019-07-20 06:01:24 +02:00
|
|
|
index 7ca5f04733..15dccc905e 100644
|
2018-06-09 15:21:40 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/TileEntityEndGateway.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/TileEntityEndGateway.java
|
2019-04-29 05:14:31 +02:00
|
|
|
@@ -144,8 +144,19 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick
|
2018-06-09 15:21:40 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
// CraftBukkit end
|
|
|
|
+ // Paper start - EntityTeleportEndGatewayEvent - replicated from above
|
|
|
|
+ org.bukkit.craftbukkit.entity.CraftEntity bukkitEntity = entity.getBukkitEntity();
|
|
|
|
+ org.bukkit.Location location = new Location(world.getWorld(), (double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D);
|
|
|
|
+ location.setPitch(bukkitEntity.getLocation().getPitch());
|
|
|
|
+ location.setYaw(bukkitEntity.getLocation().getYaw());
|
|
|
|
+
|
|
|
|
+ com.destroystokyo.paper.event.entity.EntityTeleportEndGatewayEvent event = new com.destroystokyo.paper.event.entity.EntityTeleportEndGatewayEvent(bukkitEntity, bukkitEntity.getLocation(), location, new org.bukkit.craftbukkit.block.CraftEndGateway(MCUtil.toLocation(world, this.getPosition()).getBlock()));
|
2018-06-13 23:29:49 +02:00
|
|
|
+ if (!event.callEvent()) {
|
2018-06-09 15:21:40 +02:00
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
|
2019-05-28 01:01:45 +02:00
|
|
|
- entity.enderTeleportAndLoad((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D);
|
|
|
|
+ entity.enderTeleportAndLoad(event.getTo().getX(), event.getTo().getY(), event.getTo().getZ());
|
2018-06-09 15:21:40 +02:00
|
|
|
+ // Paper end - EntityTeleportEndGatewayEvent
|
|
|
|
}
|
|
|
|
|
2019-05-28 01:01:45 +02:00
|
|
|
this.h();
|
2018-06-09 15:21:40 +02:00
|
|
|
--
|
2019-06-25 21:18:50 +02:00
|
|
|
2.22.0
|
2018-06-09 15:21:40 +02:00
|
|
|
|