diff options
Diffstat (limited to 'patches/server/0711-Optimise-general-POI-access.patch')
-rw-r--r-- | patches/server/0711-Optimise-general-POI-access.patch | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/patches/server/0711-Optimise-general-POI-access.patch b/patches/server/0711-Optimise-general-POI-access.patch index 811f418f6b..a3eb3b3a10 100644 --- a/patches/server/0711-Optimise-general-POI-access.patch +++ b/patches/server/0711-Optimise-general-POI-access.patch @@ -993,7 +993,7 @@ index 27f766fc72d779cff1b5a88a79961aa7ef91b11f..2d208f1b85193497027c4d04ab9e8cb1 return Optional.empty(); } else { diff --git a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java -index 1311d69bb2fa7b3617936e6ad6eb5236fedc260d..386a73f32f2504af81107852307dcd393d4d8a11 100644 +index 1369d4f818d203e3092fd6ba4def106dda16d6d2..b7cb9fbb15c83cd4225a241e44132279d9308f96 100644 --- a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java +++ b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java @@ -51,18 +51,39 @@ public class PortalForcer { @@ -1004,7 +1004,7 @@ index 1311d69bb2fa7b3617936e6ad6eb5236fedc260d..386a73f32f2504af81107852307dcd39 - Optional<PoiRecord> optional = villageplace.getInSquare((holder) -> { - return holder.is(PoiTypes.NETHER_PORTAL); - }, blockposition, i, PoiManager.Occupancy.ANY).filter((villageplacerecord) -> { -- return worldborder.isWithinBounds(villageplacerecord.getPos()); +- return worldborder.isWithinBounds(villageplacerecord.getPos()) && !this.level.paperConfig().environment.netherCeilingVoidDamageHeight.test(v -> villageplacerecord.getPos().getY() >= v); // Paper - don't teleport into void damage - }).sorted(Comparator.comparingDouble((PoiRecord villageplacerecord) -> { // CraftBukkit - decompile error - return villageplacerecord.getPos().distSqr(blockposition); - }).thenComparingInt((villageplacerecord) -> { @@ -1025,7 +1025,7 @@ index 1311d69bb2fa7b3617936e6ad6eb5236fedc260d..386a73f32f2504af81107852307dcd39 + // why would we generate the chunk? + return false; + } -+ if (!worldborder.isWithinBounds(pos)) { ++ if (!worldborder.isWithinBounds(pos) || this.level.paperConfig().environment.netherCeilingVoidDamageHeight.test(v -> pos.getY() >= v)) { // Paper - don't teleport into void damage + return false; + } + return lowest.getBlockState(pos).hasProperty(BlockStateProperties.HORIZONTAL_AXIS); |