mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 12:02:36 +01:00
eed041d629
By: md_5 <git@md-5.net>
22 lines
1.2 KiB
Diff
22 lines
1.2 KiB
Diff
--- a/net/minecraft/world/level/block/BlockEndGateway.java
|
|
+++ b/net/minecraft/world/level/block/BlockEndGateway.java
|
|
@@ -21,6 +21,10 @@
|
|
import net.minecraft.world.level.portal.DimensionTransition;
|
|
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);
|
|
@@ -110,7 +114,7 @@
|
|
if (tileentity instanceof TileEntityEndGateway tileentityendgateway) {
|
|
Vec3D vec3d = tileentityendgateway.getPortalPosition(worldserver, blockposition);
|
|
|
|
- return vec3d != null ? new DimensionTransition(worldserver, vec3d, calculateExitMovement(entity), entity.getYRot(), entity.getXRot(), DimensionTransition.PLACE_PORTAL_TICKET) : null;
|
|
+ return vec3d != null ? new DimensionTransition(worldserver, vec3d, calculateExitMovement(entity), entity.getYRot(), entity.getXRot(), DimensionTransition.PLACE_PORTAL_TICKET, PlayerTeleportEvent.TeleportCause.END_GATEWAY) : null; // CraftBukkit
|
|
} else {
|
|
return null;
|
|
}
|