Optimize Air/NotAir

This commit is contained in:
DBotThePony 2024-10-10 21:50:35 +07:00
parent 7d088d6433
commit fb573cb483
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -99,13 +99,13 @@ fun interface BlockPredicate {
object Air : BlockPredicate {
override fun test(pos: BlockPos, access: LevelAccessor): Boolean {
return access.isEmptyBlock(pos)
return access.getBlockStateNow(pos).isAir
}
}
object NotAir : BlockPredicate {
override fun test(pos: BlockPos, access: LevelAccessor): Boolean {
return !access.isEmptyBlock(pos)
return !access.getBlockStateNow(pos).isAir
}
}
}