aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0787-Improve-PortalEvents.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0787-Improve-PortalEvents.patch')
-rw-r--r--patches/server/0787-Improve-PortalEvents.patch6
1 files changed, 3 insertions, 3 deletions
diff --git a/patches/server/0787-Improve-PortalEvents.patch b/patches/server/0787-Improve-PortalEvents.patch
index d9ad0225b3..4b21592963 100644
--- a/patches/server/0787-Improve-PortalEvents.patch
+++ b/patches/server/0787-Improve-PortalEvents.patch
@@ -5,14 +5,14 @@ Subject: [PATCH] Improve PortalEvents
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index f52d394c90bc326c2a58c4f623df632235e0c599..ec386450f9808c724c1b2b97c6e14fc5292caafc 100644
+index fe70fec5d2d422ea9be18e6d5af377f13090ff73..76028662f54175fa95db581a06c04a140e0247b2 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3528,7 +3528,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
org.bukkit.entity.Entity bukkitEntity = entity.getBukkitEntity();
Location enter = bukkitEntity.getLocation();
-- EntityPortalEvent event = new EntityPortalEvent(bukkitEntity, enter, exit, searchRadius);
+- EntityPortalEvent event = new EntityPortalEvent(bukkitEntity, enter, exit, searchRadius, true, creationRadius);
+ // Paper start
+ final org.bukkit.PortalType portalType = switch (cause) {
+ case END_PORTAL -> org.bukkit.PortalType.ENDER;
@@ -20,7 +20,7 @@ index f52d394c90bc326c2a58c4f623df632235e0c599..ec386450f9808c724c1b2b97c6e14fc5
+ case END_GATEWAY -> org.bukkit.PortalType.END_GATEWAY; // not actually used yet
+ default -> org.bukkit.PortalType.CUSTOM;
+ };
-+ EntityPortalEvent event = new EntityPortalEvent(bukkitEntity, enter, exit, searchRadius, portalType);
++ EntityPortalEvent event = new EntityPortalEvent(bukkitEntity, enter, exit, searchRadius, true, creationRadius, portalType);
+ // Paper end
event.getEntity().getServer().getPluginManager().callEvent(event);
if (event.isCancelled() || event.getTo() == null || event.getTo().getWorld() == null || !entity.isAlive()) {