--- a/net/minecraft/world/level/block/BlockEndGateway.java +++ b/net/minecraft/world/level/block/BlockEndGateway.java @@ -23,6 +23,10 @@ import net.minecraft.world.level.portal.TeleportTransition; import net.minecraft.world.phys.Vec3D; +// CraftBukkit start +import org.bukkit.event.player.PlayerTeleportEvent; +// CraftBukkit end + public class BlockEndGateway extends BlockTileEntity implements Portal { public static final MapCodec CODEC = simpleCodec(BlockEndGateway::new); @@ -112,7 +116,7 @@ if (tileentity instanceof TileEntityEndGateway tileentityendgateway) { Vec3D vec3d = tileentityendgateway.getPortalPosition(worldserver, blockposition); - return vec3d == null ? null : (entity instanceof EntityEnderPearl ? new TeleportTransition(worldserver, vec3d, Vec3D.ZERO, 0.0F, 0.0F, Set.of(), TeleportTransition.PLACE_PORTAL_TICKET) : new TeleportTransition(worldserver, vec3d, Vec3D.ZERO, 0.0F, 0.0F, Relative.union(Relative.DELTA, Relative.ROTATION), TeleportTransition.PLACE_PORTAL_TICKET)); + return vec3d == null ? null : (entity instanceof EntityEnderPearl ? new TeleportTransition(worldserver, vec3d, Vec3D.ZERO, 0.0F, 0.0F, Set.of(), TeleportTransition.PLACE_PORTAL_TICKET, PlayerTeleportEvent.TeleportCause.END_GATEWAY) : new TeleportTransition(worldserver, vec3d, Vec3D.ZERO, 0.0F, 0.0F, Relative.union(Relative.DELTA, Relative.ROTATION), TeleportTransition.PLACE_PORTAL_TICKET, PlayerTeleportEvent.TeleportCause.END_GATEWAY)); // CraftBukkit } else { return null; }