Skip to content

Commit e8158d6

Browse files
authored
Merge pull request #46 from DuckHunter229/master
Remove leaves being traversable in isTraversable()
2 parents 6472662 + 2965bc0 commit e8158d6

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

src/main/kotlin/org/cobalt/api/pathfinder/pathing/processing/impl/MinecraftPathProcessor.kt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,12 @@ class MinecraftPathProcessor : NodeProcessor {
5454
dy < -0.5 -> true // falling
5555
dy > 0.5 ->
5656
prevPoint.hasFloor() ||
57-
currentPoint.isClimbable() ||
58-
currentPoint.isLiquid() // jumping/climbing
57+
currentPoint.isClimbable() // jumping/climbing
5958
else ->
6059
currentPoint.hasFloor() ||
6160
prevPoint.hasFloor() ||
6261
currentPoint.isClimbable() ||
63-
prevPoint.isClimbable() ||
64-
currentPoint.isLiquid() ||
65-
prevPoint.isLiquid()
62+
prevPoint.isClimbable()
6663
}
6764
}
6865

src/main/kotlin/org/cobalt/api/pathfinder/provider/impl/MinecraftNavigationProvider.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class MinecraftNavigationProvider : NavigationPointProvider {
8888
return state.getValue(FenceGateBlock.OPEN)
8989
}
9090

91-
if (block is BaseRailBlock || block is LeavesBlock) {
91+
if (block is BaseRailBlock) {
9292
return true
9393
}
9494

@@ -120,8 +120,7 @@ class MinecraftNavigationProvider : NavigationPointProvider {
120120
block == Blocks.GLASS ||
121121
block is StairBlock ||
122122
block is SlabBlock ||
123-
block is BaseRailBlock ||
124-
!state.fluidState.isEmpty
123+
block is BaseRailBlock
125124
}
126125

127126
private fun calculateFloorLevel(level: Level, pos: BlockPos): Double {

0 commit comments

Comments
 (0)