Skip to content

Commit 22efcee

Browse files
committed
fixed crash double door sound fix
1 parent 85a3783 commit 22efcee

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

common/src/main/java/net/adeptstack/Blocks/Doors/SlidingDoor/TrainSlidingDoorBlock.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,17 @@ public static boolean isDoubleDoor(DoorHingeSide hinge, BlockPos pos, Direction
5454
StructureTemplate.StructureBlockInfo structureBlockInfo = context.contraption.getBlocks().get(posH2);
5555
if (structureBlockInfo == null)
5656
return false;
57-
if (structureBlockInfo.state().getValue(HINGE) == DoorHingeSide.RIGHT) {
58-
return structureBlockInfo.state().getBlock() instanceof TrainSlidingDoorBlock;
57+
if (structureBlockInfo.state().getBlock() instanceof TrainSlidingDoorBlock) {
58+
return structureBlockInfo.state().getValue(HINGE) == DoorHingeSide.RIGHT;
5959
}
6060
}
6161
else {
6262
BlockPos posH2 = PlacementUtils.getPlaceDirectionRight(pos, facing);
6363
StructureTemplate.StructureBlockInfo structureBlockInfo = context.contraption.getBlocks().get(posH2);
6464
if (structureBlockInfo == null)
6565
return false;
66-
if (structureBlockInfo.state().getValue(HINGE) == DoorHingeSide.LEFT) {
67-
return structureBlockInfo.state().getBlock() instanceof TrainSlidingDoorBlock;
66+
if (structureBlockInfo.state().getBlock() instanceof TrainSlidingDoorBlock) {
67+
return structureBlockInfo.state().getValue(HINGE) == DoorHingeSide.LEFT;
6868
}
6969
}
7070
return false;

0 commit comments

Comments
 (0)