PaperMC/paper-server/nms-patches/net/minecraft/world/level/block/BlockEndGateway.patch
CraftBukkit/Spigot eed041d629 Update to Minecraft 1.21
By: md_5 <git@md-5.net>
2024-06-14 01:05:00 +10:00

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