Skip to content

Commit 8e218e2

Browse files
committed
hotfix #721
1 parent 98a9a16 commit 8e218e2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/com/ldtteam/structurize/util/BlockUtils.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,11 @@ else if (item instanceof BlockItem)
553553
// place
554554
world.setBlock(here, Blocks.COBBLESTONE.defaultBlockState(), Block.UPDATE_CLIENTS);
555555
world.setBlock(here, newState, Constants.UPDATE_FLAG);
556-
world.getBlockEntity(here).applyComponentsFromItemStack(stackToPlace);
556+
final BlockEntity blockEntity = world.getBlockEntity(here);
557+
if (blockEntity != null)
558+
{
559+
blockEntity.applyComponentsFromItemStack(stackToPlace);
560+
}
557561
targetBlock.setPlacedBy(world, here, newState, fakePlayer, stackToPlace);
558562
}
559563
else if (item instanceof BucketItem)

0 commit comments

Comments
 (0)