Skip to content
This repository has been archived by the owner on May 12, 2024. It is now read-only.

Commit

Permalink
BedCity ignores bed block
Browse files Browse the repository at this point in the history
  • Loading branch information
Luna5ama committed Sep 13, 2023
1 parent feb8b15 commit dced9d4
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import dev.luna5ama.trollhack.util.world.canBreakBlock
import dev.luna5ama.trollhack.util.world.checkBlockCollision
import dev.luna5ama.trollhack.util.world.isAir
import dev.luna5ama.trollhack.util.world.isFullBox
import net.minecraft.block.BlockBed
import net.minecraft.block.BlockConcretePowder
import net.minecraft.block.BlockFalling
import net.minecraft.block.BlockSand
Expand Down Expand Up @@ -85,11 +86,10 @@ internal object BedCity : Module(

val blockState = world.getBlockState(pos)
val block = blockState.block
if (block is BlockBed) return true
if (block is BlockFalling) return true
if (blockState.isAir) return true
if (ignoreNonFullBox && !blockState.isFullBox) return false

return false
return if (ignoreNonFullBox) !world.getBlockState(pos).isFullBox else world.isAir(pos)
}

fun minePos(minePos: BlockPos?): Boolean {
Expand Down

0 comments on commit dced9d4

Please sign in to comment.