Skip to content

Commit

Permalink
Fix star coin replacing blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
WenXin20 committed Mar 5, 2025
1 parent 24e6571 commit dba2f7f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ public BlockState getStateForPlacement(BlockPlaceContext context) {

BlockPos northWestPos = pos.relative(Direction.NORTH).relative(Direction.WEST);

if (!canPlaceBlock(world, northWestPos.relative(Direction.EAST))
if (!canPlaceBlock(world, northWestPos)
||!canPlaceBlock(world, northWestPos.relative(Direction.EAST))
|| !canPlaceBlock(world, northWestPos.relative(Direction.SOUTH))
|| !canPlaceBlock(world, northWestPos.relative(Direction.SOUTH).relative(Direction.EAST))
|| !canPlaceBlock(world, northWestPos.above())
Expand All @@ -200,7 +201,8 @@ public void setPlacedBy(Level world, BlockPos pos, BlockState state, LivingEntit
if (entity != null) {
BlockPos northWestPos = pos.relative(Direction.NORTH).relative(Direction.WEST);

if (canPlaceBlock(world, northWestPos.relative(Direction.EAST))
if (canPlaceBlock(world, northWestPos)
&& canPlaceBlock(world, northWestPos.relative(Direction.EAST))
&& canPlaceBlock(world, northWestPos.relative(Direction.SOUTH))
&& canPlaceBlock(world, northWestPos.relative(Direction.SOUTH).relative(Direction.EAST))
&& canPlaceBlock(world, northWestPos.above())
Expand Down

0 comments on commit dba2f7f

Please sign in to comment.