Updated Upstream (Bukkit/CraftBukkit/Spigot)
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 Bukkit Changes: 7dd1cfcd PortalEvent additions CraftBukkit Changes: e8cb2f51 SPIGOT-5252: Nether portal fixes and additions fde78ef3 SPIGOT-5477: Server not shutting down Spigot Changes: 037559e7 Rebuild patches
This commit is contained in:
@@ -18,21 +18,39 @@ index 62e793b71..5de4ec052 100644
|
||||
+ 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 2ed5ff412..909f446c6 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
|
||||
|
||||
// CraftBukkit start - EntityPortalEvent
|
||||
// SPIGOT-5136 - don't fire event for CraftEntity.teleport
|
||||
- int searchRadius = 128;
|
||||
+ int searchRadius = world.paperConfig.portalSearchRadius; // Paper - use portal search radius as default
|
||||
if (location == null) {
|
||||
Location enter = this.getBukkitEntity().getLocation();
|
||||
Location exit = new Location(worldserver1.getWorld(), blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||
diff --git a/src/main/java/net/minecraft/server/PortalTravelAgent.java b/src/main/java/net/minecraft/server/PortalTravelAgent.java
|
||||
index 192ddb90a..25b694e7d 100644
|
||||
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 {
|
||||
public ShapeDetector.Shape a(BlockPosition blockposition, Vec3D vec3d, EnumDirection enumdirection, double d0, double d1, boolean flag) {
|
||||
@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, world.paperConfig.portalSearchRadius); // Paper - TODO: VALIDATE
|
||||
+ 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, 128, VillagePlace.Occupancy.ANY).collect(Collectors.toList());
|
||||
+ }, blockposition, world.paperConfig.portalSearchRadius, VillagePlace.Occupancy.ANY).collect(Collectors.toList()); // Paper - TODO: VALIDATE
|
||||
Optional<VillagePlaceRecord> optional = list.stream().min(Comparator.<VillagePlaceRecord>comparingDouble((villageplacerecord) -> { // CraftBukkit - decompile error
|
||||
return villageplacerecord.f().m(blockposition);
|
||||
}).thenComparingInt((villageplacerecord) -> {
|
||||
}, blockposition, searchRadius, VillagePlace.Occupancy.ANY).collect(Collectors.toList()); // CraftBukkit - searchRadius
|
||||
--
|
||||
Reference in New Issue
Block a user