Tweak terminal placement behavior

This commit is contained in:
Shadowfacts 2021-03-06 19:09:35 -05:00
parent 89e91796a5
commit 1c405f8623
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 1 additions and 2 deletions

View File

@ -55,8 +55,7 @@ class TerminalBlock: DeviceBlock<TerminalBlockEntity>(
}
override fun getPlacementState(context: ItemPlacementContext): BlockState {
val facing = if (context.player?.isSneaking == true) context.side else context.playerFacing.opposite
return defaultState.with(FACING, facing)
return defaultState.with(FACING, context.playerLookDirection.opposite)
}
override fun createBlockEntity(world: BlockView) = TerminalBlockEntity()