geforkt von Mirrors/Paper
10159aa459
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
CraftBukkit Changes:
01334e7d
#616: Fix exception on entity portal teleport attempt
56 Zeilen
3.1 KiB
Diff
56 Zeilen
3.1 KiB
Diff
From 0000000000000000000000000000000000000000 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 62e793b71..5de4ec052 100644
|
|
--- 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 {
|
|
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/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
|
index 4fcba0c0d..6314c4a19 100644
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
|
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
|
|
blockposition = new BlockPosition(d0, this.locY(), d1);
|
|
// CraftBukkit start
|
|
- EntityPortalEvent event = CraftEventFactory.callEntityPortalEvent(this, worldserver1, blockposition, 128);
|
|
+ EntityPortalEvent event = CraftEventFactory.callEntityPortalEvent(this, worldserver1, blockposition, world.paperConfig.portalSearchRadius); // Paper - use portal search radius
|
|
if (event == null) {
|
|
return null;
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/PortalTravelAgent.java b/src/main/java/net/minecraft/server/PortalTravelAgent.java
|
|
index 503e3016a..b5f224e3b 100644
|
|
--- a/src/main/java/net/minecraft/server/PortalTravelAgent.java
|
|
+++ b/src/main/java/net/minecraft/server/PortalTravelAgent.java
|
|
@@ -0,0 +0,0 @@ public class PortalTravelAgent {
|
|
@Nullable
|
|
public ShapeDetector.Shape a(BlockPosition blockposition, Vec3D vec3d, EnumDirection enumdirection, double d0, double d1, boolean flag) { // PAIL: rename to findPortal, d0 = portal offset x, d1 = portal offset z, flag = instanceof EntityHuman
|
|
// CraftBukkit start
|
|
- return findPortal(blockposition, vec3d, enumdirection, d0, d1, flag, 128);
|
|
+ return findPortal(blockposition, vec3d, enumdirection, d0, d1, flag, world.paperConfig.portalSearchRadius); // Paper
|
|
}
|
|
|
|
@Nullable
|
|
@@ -0,0 +0,0 @@ public class PortalTravelAgent {
|
|
// CraftBukkit end
|
|
VillagePlace villageplace = this.world.B();
|
|
|
|
- villageplace.a(this.world, blockposition, 128);
|
|
+ villageplace.a(this.world, blockposition, searchRadius); // Paper - This impacts the # of chunks searched for entries
|
|
List<VillagePlaceRecord> list = (List) villageplace.b((villageplacetype) -> {
|
|
return villageplacetype == VillagePlaceType.u;
|
|
}, blockposition, searchRadius, VillagePlace.Occupancy.ANY).collect(Collectors.toList()); // CraftBukkit - searchRadius
|
|
--
|