File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
common/src/main/kotlin/com/lambda/graphics/renderer/esp Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ package com.lambda.graphics.renderer.esp
1919
2020import com.lambda.util.world.FastVector
2121import com.lambda.util.world.offset
22+ import com.lambda.util.world.toBlockPos
23+ import com.lambda.util.world.toFastVec
2224import net.minecraft.util.math.BlockPos
2325import net.minecraft.util.math.Direction
2426
@@ -41,15 +43,8 @@ object DirectionMask {
4143 fun Int.exclude (direction : Direction ) = exclude(direction.mask)
4244 fun Int.hasDirection (dir : Int ) = (this and dir) != 0
4345
44- fun buildSideMesh (position : BlockPos , filter : (BlockPos ) -> Boolean ): Int {
45- var sides = ALL
46-
47- Direction .entries
48- .filter { filter(position.offset(it)) }
49- .forEach { sides = sides.exclude(it.mask) }
50-
51- return sides
52- }
46+ fun buildSideMesh (position : BlockPos , filter : (BlockPos ) -> Boolean ) =
47+ buildSideMesh(position.toFastVec()) { filter(it.toBlockPos()) }
5348
5449 fun buildSideMesh (position : FastVector , filter : (FastVector ) -> Boolean ): Int {
5550 var sides = ALL
You can’t perform that action at this time.
0 commit comments