Mark star chair as having description

This commit is contained in:
DBotThePony 2025-01-21 15:43:20 +07:00
parent f922df53be
commit 1a50ecd6af
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -12,6 +12,7 @@ import net.minecraft.world.phys.BlockHitResult
import net.minecraft.world.phys.shapes.CollisionContext
import net.minecraft.world.phys.shapes.VoxelShape
import ru.dbotthepony.mc.otm.block.RotatableMatteryBlock
import ru.dbotthepony.mc.otm.block.addSimpleDescription
import ru.dbotthepony.mc.otm.block.getShapeForEachState
import ru.dbotthepony.mc.otm.core.AABB
import ru.dbotthepony.mc.otm.core.get
@ -23,6 +24,10 @@ import ru.dbotthepony.mc.otm.shapes.BlockShapes
class StarChairBlock(val color: DyeColor?) : RotatableMatteryBlock(DEFAULT_PROPERTIES.mapColor(color?.mapColor ?: MapColor.COLOR_LIGHT_BLUE)) {
override fun rotationFreedom(): BlockRotationFreedom = BlockRotationFreedom.HORIZONTAL
init {
addSimpleDescription()
}
private val shapes = getShapeForEachState(rotationProperty) { BlockShapes.STAR_CHAIR.rotateFromNorth(it[rotationProperty]).computeShape() }
override fun getShape(state: BlockState, blockGetter: BlockGetter, pos: BlockPos, context: CollisionContext): VoxelShape = shapes[state]!!