diff --git a/Spigot-Server-Patches/Add-configurable-portal-search-radius.patch b/Spigot-Server-Patches/Add-configurable-portal-search-radius.patch index fc1b9033ac..a57399eb17 100644 --- a/Spigot-Server-Patches/Add-configurable-portal-search-radius.patch +++ b/Spigot-Server-Patches/Add-configurable-portal-search-radius.patch @@ -15,9 +15,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + public int portalSearchRadius; + public int portalCreateRadius; ++ public boolean portalSearchVanillaDimensionScaling; + private void portalSearchRadius() { + portalSearchRadius = getInt("portal-search-radius", 128); + portalCreateRadius = getInt("portal-create-radius", 16); ++ portalSearchVanillaDimensionScaling = getBoolean("portal-search-vanilla-dimension-scaling", true); + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java @@ -29,7 +31,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 BlockPosition blockposition = new BlockPosition(MathHelper.a(this.locX() * d4, d0, d2), this.locY(), MathHelper.a(this.locZ() * d4, d1, d3)); // CraftBukkit start - CraftPortalEvent event = callPortalEvent(this, worldserver, blockposition, PlayerTeleportEvent.TeleportCause.NETHER_PORTAL, flag2 ? 16 : 128, 16); -+ CraftPortalEvent event = callPortalEvent(this, worldserver, blockposition, PlayerTeleportEvent.TeleportCause.NETHER_PORTAL, worldserver.paperConfig.portalSearchRadius, worldserver.paperConfig.portalCreateRadius); // Paper start - configurable portal radius ++ // Paper start ++ int portalSearchRadius = worldserver.paperConfig.portalSearchRadius; ++ if (world.paperConfig.portalSearchVanillaDimensionScaling && flag2) { // == THE_NETHER ++ portalSearchRadius = (int) (portalSearchRadius / worldserver.getDimensionManager().getCoordinateScale()); ++ } ++ // Paper end ++ CraftPortalEvent event = callPortalEvent(this, worldserver, blockposition, PlayerTeleportEvent.TeleportCause.NETHER_PORTAL, portalSearchRadius, worldserver.paperConfig.portalCreateRadius); // Paper start - configurable portal radius if (event == null) { return null; } diff --git a/Spigot-Server-Patches/Configurable-inter-world-teleportation-safety.patch b/Spigot-Server-Patches/Configurable-inter-world-teleportation-safety.patch index 05a2d3c2f5..0969946e5c 100644 --- a/Spigot-Server-Patches/Configurable-inter-world-teleportation-safety.patch +++ b/Spigot-Server-Patches/Configurable-inter-world-teleportation-safety.patch @@ -20,8 +20,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -0,0 +0,0 @@ public class PaperWorldConfig { - portalSearchRadius = getInt("portal-search-radius", 128); portalCreateRadius = getInt("portal-create-radius", 16); + portalSearchVanillaDimensionScaling = getBoolean("portal-search-vanilla-dimension-scaling", true); } + + public boolean disableTeleportationSuffocationCheck;