pretty lomp.
This commit is contained in:
parent
e8d76a4a8e
commit
0ea4669d49
@ -119,7 +119,7 @@ class LaboratoryLamp(val invertRedstone: Boolean) : Block(Properties.of(Material
|
|||||||
override fun getStateForPlacement(context: BlockPlaceContext): BlockState {
|
override fun getStateForPlacement(context: BlockPlaceContext): BlockState {
|
||||||
return super.getStateForPlacement(context)!!
|
return super.getStateForPlacement(context)!!
|
||||||
.setValue(BlockStateProperties.LIT, !invertRedstone)
|
.setValue(BlockStateProperties.LIT, !invertRedstone)
|
||||||
.setValue(FACING_FULL, -context.nearestLookingDirection.blockRotation)
|
.setValue(FACING_FULL, context.nearestLookingDirection.blockRotation.oppositeFront)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun appendHoverText(
|
override fun appendHoverText(
|
||||||
|
@ -155,6 +155,8 @@ enum class BlockRotation(
|
|||||||
val opposite by lazy { of(front.opposite, top.opposite) }
|
val opposite by lazy { of(front.opposite, top.opposite) }
|
||||||
val normal: Vec3i get() = front.normal
|
val normal: Vec3i get() = front.normal
|
||||||
|
|
||||||
|
val oppositeFront by lazy { of(front.opposite, top) }
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun of(direction: Direction): BlockRotation {
|
fun of(direction: Direction): BlockRotation {
|
||||||
|
Loading…
Reference in New Issue
Block a user