Re-implement portalCreateRadius world config (#11267)

This commit is contained in:
Lulu13022002 2024-08-16 22:59:46 +02:00 committed by GitHub
parent e619744fbd
commit 78216fef26
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Add configurable portal search radius
diff --git a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java
index 462afb22cce2376789e44283032e63a6264cf851..19c813ab9e71eed150ae569f903287e9283d9292 100644
index 462afb22cce2376789e44283032e63a6264cf851..8072e67f7b2f5944670159d3de1b01090bd1019d 100644
--- a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java
@@ -139,8 +139,14 @@ public class NetherPortalBlock extends Block implements Portal {
@ -20,7 +20,7 @@ index 462afb22cce2376789e44283032e63a6264cf851..19c813ab9e71eed150ae569f903287e9
+ // Paper end - Configurable portal search radius
// CraftBukkit start
- CraftPortalEvent event = entity.callPortalEvent(entity, CraftLocation.toBukkit(blockposition1, worldserver1.getWorld()), PlayerTeleportEvent.TeleportCause.NETHER_PORTAL, flag ? 16 : 128, 16);
+ CraftPortalEvent event = entity.callPortalEvent(entity, CraftLocation.toBukkit(blockposition1, worldserver1.getWorld()), PlayerTeleportEvent.TeleportCause.NETHER_PORTAL, portalSearchRadius, 16); // Paper - use custom portal search radius
+ CraftPortalEvent event = entity.callPortalEvent(entity, CraftLocation.toBukkit(blockposition1, worldserver1.getWorld()), PlayerTeleportEvent.TeleportCause.NETHER_PORTAL, portalSearchRadius, worldserver1.paperConfig().environment.portalCreateRadius); // Paper - use custom portal search radius
if (event == null) {
return null;
}