Skip to content

Commit

Permalink
Fix block placing on blocks with interactive backing state
Browse files Browse the repository at this point in the history
  • Loading branch information
NichtStudioCode committed Nov 22, 2024
1 parent d8c625f commit 11deb56
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ internal object BlockPlacing : Listener {
if (action == Action.RIGHT_CLICK_BLOCK) {
val handItem = event.item
val block = event.clickedBlock!!
val novaBlockState = WorldDataManager.getBlockState(block.pos)

if (!block.type.isActuallyInteractable() || player.isSneaking) {
if (novaBlockState != null || !block.type.isActuallyInteractable() || player.isSneaking) {
val novaItem = handItem?.novaItem
val novaBlock = novaItem?.block
if (novaBlock != null) {
Expand All @@ -100,7 +101,7 @@ internal object BlockPlacing : Listener {

placeNovaBlock(event, novaBlock)
} else if (
WorldDataManager.getBlockState(block.pos) != null // the block placed against is from Nova
novaBlockState != null // the block placed against is from Nova
&& block.type.isReplaceable() // and will be replaced without special behavior
&& novaItem == null
&& handItem?.type?.isBlock == true // a vanilla block material is used
Expand Down

0 comments on commit 11deb56

Please sign in to comment.