0
0
mirror of https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git synced 2024-11-22 10:06:16 +00:00
craftbukkit/nms-patches/net/minecraft/world/level/block/BlockEndGateway.patch
2024-10-23 02:15:00 +11:00

23 lines
1.6 KiB
Diff

--- 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<BlockEndGateway> 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;
}