Skip to content

Commit

Permalink
Fixed up some errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Qzimyion committed Nov 8, 2023
1 parent 905f282 commit 48d9187
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ public BlockState getStateForNeighborUpdate(BlockState state, Direction directio
public BlockState getConnection(BlockState state, WorldAccess world, BlockPos pos){
Direction facing = state.get(FACING);

BlockState top = world.getBlockState(pos.offset(facing.rotateClockwise(Direction.Axis.Y)));
BlockState bottom = world.getBlockState(pos.offset(facing.rotateCounterclockwise(Direction.Axis.Y)));
BlockState top = world.getBlockState(pos.up());
BlockState bottom = world.getBlockState(pos.down());

boolean sideU = (top.getBlock() instanceof ShojiBlocks && (top.get(FACING)==facing) || top.get(FACING)==facing.rotateClockwise(Direction.Axis.Y));
boolean sideD = (top.getBlock() instanceof ShojiBlocks && (bottom.get(FACING)==facing) || top.get(FACING)==facing.rotateCounterclockwise(Direction.Axis.Y));
boolean sideU = (bottom.getBlock() instanceof ShojiBlocks && (bottom.get(FACING)==facing));
boolean sideD = (top.getBlock() instanceof ShojiBlocks && (top.get(FACING)==facing));
ShojiShapes shapes = sideU && sideD ? ShojiShapes.MID : (sideD ? ShojiShapes.BOTTOM : (sideU ? ShojiShapes.TOP : ShojiShapes.NONE));
return state.with(SHOJI_SHAPE, shapes);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ public String toString() {

@Override
public String asString() {
return null;
return this.name;
}
}

0 comments on commit 48d9187

Please sign in to comment.