Fix configs that relied on outdated min/max y levels (#6986)

This commit is contained in:
Jake Potrebic
2022-10-08 23:52:09 -07:00
parent 68ca16f075
commit 5eb4ada324
5 changed files with 170 additions and 52 deletions

View File

@@ -1004,7 +1004,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- 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 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // 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);