mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 23:57:43 +01:00
0d3b35c339
This option does not set the absolute speed of the entity as the name implies. It sets a modifier. The default (vanilla) value of `0.5` sets the baby zombie to move at 50% faster than the base speed. A negative value like `-0.4` would set them to move at 40% slower. There should be no functional changes as a result of this change, it's just clarifying the config name.
41 lines
2.1 KiB
Diff
41 lines
2.1 KiB
Diff
From 63dc2abcfda17e4a21a4c439763da839d46fbf5d Mon Sep 17 00:00:00 2001
|
|
From: Joseph Hirschfeld <joe@ibj.io>
|
|
Date: Thu, 3 Mar 2016 02:46:17 -0600
|
|
Subject: [PATCH] Add configurable portal search radius
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
index 95245a981..1d4ba4703 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -191,4 +191,9 @@ public class PaperWorldConfig {
|
|
private void allChunksAreSlimeChunks() {
|
|
allChunksAreSlimeChunks = getBoolean("all-chunks-are-slime-chunks", false);
|
|
}
|
|
+
|
|
+ public int portalSearchRadius;
|
|
+ private void portalSearchRadius() {
|
|
+ portalSearchRadius = getInt("portal-search-radius", 128);
|
|
+ }
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/PortalTravelAgent.java b/src/main/java/net/minecraft/server/PortalTravelAgent.java
|
|
index 6552f9e25..2f0a8e4bb 100644
|
|
--- a/src/main/java/net/minecraft/server/PortalTravelAgent.java
|
|
+++ b/src/main/java/net/minecraft/server/PortalTravelAgent.java
|
|
@@ -70,10 +70,11 @@ public class PortalTravelAgent {
|
|
} else {
|
|
double d2 = Double.MAX_VALUE;
|
|
|
|
- for (int i = -128; i <= 128; ++i) {
|
|
+ int portalSearchRadius = world.paperConfig.portalSearchRadius; // Paper
|
|
+ for (int i = -portalSearchRadius; i <= portalSearchRadius; ++i) { // Paper
|
|
BlockPosition blockposition2;
|
|
|
|
- for (int j = -128; j <= 128; ++j) {
|
|
+ for (int j = -world.paperConfig.portalSearchRadius; j <= world.paperConfig.portalSearchRadius; ++j) { // Paper
|
|
for (BlockPosition blockposition3 = blockposition.b(i, this.world.getHeight() - 1 - blockposition.getY(), j); blockposition3.getY() >= 0; blockposition3 = blockposition2) {
|
|
blockposition2 = blockposition3.down();
|
|
if (this.world.getType(blockposition3).getBlock() == PortalTravelAgent.b) {
|
|
--
|
|
2.23.0
|
|
|