Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
Fix crash when direction is up or down
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander01998 committed Dec 13, 2023
1 parent 72d14e5 commit 15b7896
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/main/java/net/wurstclient/glass/GlassStairsBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,10 @@ private boolean isInvisibleToGlassStairs(BlockState state,
return true;

// other curved stairs fully covered side
if(facingFrom == direction.getClockWise()
if(facingFrom.getCounterClockWise() == direction
&& shapeFrom == StairsShape.INNER_RIGHT)
return true;
if(facingFrom == direction.getCounterClockWise()
if(facingFrom.getClockWise() == direction
&& shapeFrom == StairsShape.INNER_LEFT)
return true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,10 @@ private boolean isInvisibleToGlassStairs(BlockState state,
return true;

// other curved stairs fully covered side
if(facingFrom == direction.getClockWise()
if(facingFrom.getCounterClockWise() == direction
&& shapeFrom == StairsShape.INNER_RIGHT)
return true;
if(facingFrom == direction.getCounterClockWise()
if(facingFrom.getClockWise() == direction
&& shapeFrom == StairsShape.INNER_LEFT)
return true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,10 @@ private boolean isInvisibleToGlassStairs(BlockState state,
return true;

// other curved stairs fully covered side
if(facingFrom == direction.getClockWise()
if(facingFrom.getCounterClockWise() == direction
&& shapeFrom == StairsShape.INNER_RIGHT)
return true;
if(facingFrom == direction.getCounterClockWise()
if(facingFrom.getClockWise() == direction
&& shapeFrom == StairsShape.INNER_LEFT)
return true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ private boolean isInvisibleToGlassStairs(BlockState state,
return true;

// other curved stairs fully covered side
if(facingFrom == direction.getClockWise()
if(facingFrom.getCounterClockWise() == direction
&& shapeFrom == StairsShape.INNER_RIGHT)
return true;
if(facingFrom == direction.getCounterClockWise()
if(facingFrom.getClockWise() == direction
&& shapeFrom == StairsShape.INNER_LEFT)
return true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ private boolean isInvisibleToGlassStairs(BlockState state,
return true;

// other curved stairs fully covered side
if(facingFrom == direction.getClockWise()
if(facingFrom.getCounterClockWise() == direction
&& shapeFrom == StairsShape.INNER_RIGHT)
return true;
if(facingFrom == direction.getCounterClockWise()
if(facingFrom.getClockWise() == direction
&& shapeFrom == StairsShape.INNER_LEFT)
return true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ private boolean isInvisibleToGlassStairs(BlockState state,
return true;

// other curved stairs fully covered side
if(facingFrom == direction.getClockWise()
if(facingFrom.getCounterClockWise() == direction
&& shapeFrom == StairsShape.INNER_RIGHT)
return true;
if(facingFrom == direction.getCounterClockWise()
if(facingFrom.getClockWise() == direction
&& shapeFrom == StairsShape.INNER_LEFT)
return true;

Expand Down

0 comments on commit 15b7896

Please sign in to comment.