geforkt von Mirrors/Paper
nerf nether search radius config (#4781)
Dieser Commit ist enthalten in:
Ursprung
8a917b49f4
Commit
c92072e21d
@ -15,9 +15,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+
|
+
|
||||||
+ public int portalSearchRadius;
|
+ public int portalSearchRadius;
|
||||||
+ public int portalCreateRadius;
|
+ public int portalCreateRadius;
|
||||||
|
+ public boolean portalSearchVanillaDimensionScaling;
|
||||||
+ private void portalSearchRadius() {
|
+ private void portalSearchRadius() {
|
||||||
+ portalSearchRadius = getInt("portal-search-radius", 128);
|
+ portalSearchRadius = getInt("portal-search-radius", 128);
|
||||||
+ portalCreateRadius = getInt("portal-create-radius", 16);
|
+ 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
|
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));
|
BlockPosition blockposition = new BlockPosition(MathHelper.a(this.locX() * d4, d0, d2), this.locY(), MathHelper.a(this.locZ() * d4, d1, d3));
|
||||||
// CraftBukkit start
|
// 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, 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) {
|
if (event == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -20,8 +20,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
||||||
portalSearchRadius = getInt("portal-search-radius", 128);
|
|
||||||
portalCreateRadius = getInt("portal-create-radius", 16);
|
portalCreateRadius = getInt("portal-create-radius", 16);
|
||||||
|
portalSearchVanillaDimensionScaling = getBoolean("portal-search-vanilla-dimension-scaling", true);
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ public boolean disableTeleportationSuffocationCheck;
|
+ public boolean disableTeleportationSuffocationCheck;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren