diff options
author | Jake Potrebic <[email protected]> | 2022-10-08 23:52:09 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2022-10-09 08:52:09 +0200 |
commit | c389b1c4085ab9efc2cfe1714e39c20365d51101 (patch) | |
tree | 1862373e1f27c5a4888e4032862d73020025f09a /patches/server/0711-Optimise-general-POI-access.patch | |
parent | 77a50b95dada2d73b92fdd95d674d357b64bc7d4 (diff) | |
download | Paper-c389b1c4085ab9efc2cfe1714e39c20365d51101.tar.gz Paper-c389b1c4085ab9efc2cfe1714e39c20365d51101.zip |
Fix configs that relied on outdated min/max y levels (#6986)
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); |