From beb24dd23b2a512df379066c0c904402af94792b Mon Sep 17 00:00:00 2001 From: Thijs Hendrickx Date: Fri, 6 Aug 2021 02:55:12 +0200 Subject: [PATCH] Fix section transition behavior being applied to any Y level below (0 + overlap). (#73) --- .../minecraft/deeperworld/world/section/SectionUtils.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/derongan/minecraft/deeperworld/world/section/SectionUtils.kt b/src/main/java/com/derongan/minecraft/deeperworld/world/section/SectionUtils.kt index eafcd42..99708d4 100644 --- a/src/main/java/com/derongan/minecraft/deeperworld/world/section/SectionUtils.kt +++ b/src/main/java/com/derongan/minecraft/deeperworld/world/section/SectionUtils.kt @@ -72,7 +72,7 @@ val Location.inSectionOverlap: Boolean fun Location.sharedBetween(section: Section, otherSection: Section): Boolean { val overlap = section.overlapWith(otherSection) ?: return false return when { - section.isOnTopOf(otherSection) -> blockY <= overlap + section.isOnTopOf(otherSection) -> blockY <= world.minHeight + overlap otherSection.isOnTopOf(section) -> blockY >= world.maxHeight - overlap else -> false }