Skip to content

Commit

Permalink
Merge pull request #22 from PTOM76/1.16.5
Browse files Browse the repository at this point in the history
EnhancedQuarry 1.2.0-RC7
  • Loading branch information
PTOM76 authored Oct 9, 2021
2 parents 940d885 + 71344ff commit b52918f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ loader_version=0.11.6

fabric_version=0.40.1+1.16

mod_version = 1.2.0_RC6
mod_version = 1.2.0_RC7
maven_group = ml.pkom
archives_base_name = EnhancedQuarries-1.16.5
18 changes: 17 additions & 1 deletion src/main/java/ml/pkom/enhancedquarries/block/Frame.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,23 @@ public static BlockState getPlacementStateDefine(World world, BlockPos pos) {
@Override
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos) {
if (world.isClient()) return super.getStateForNeighborUpdate(state, direction, neighborState, world, pos, neighborPos);
return state.with(ConnectingBlock.FACING_PROPERTIES.get(direction), canConnect(world, pos.offset(direction)));
try {
if (direction.equals(Direction.NORTH))
return state.with(CONNECT_NORTH, canConnect(world, pos.offset(direction)));
if (direction.equals(Direction.SOUTH))
return state.with(CONNECT_SOUTH, canConnect(world, pos.offset(direction)));
if (direction.equals(Direction.WEST))
return state.with(CONNECT_WEST, canConnect(world, pos.offset(direction)));
if (direction.equals(Direction.EAST))
return state.with(CONNECT_EAST, canConnect(world, pos.offset(direction)));
if (direction.equals(Direction.UP))
return state.with(CONNECT_UP, canConnect(world, pos.offset(direction)));
if (direction.equals(Direction.DOWN))
return state.with(CONNECT_DOWN, canConnect(world, pos.offset(direction)));
} catch (IllegalArgumentException e) {
return super.getStateForNeighborUpdate(state, direction, neighborState, world, pos, neighborPos);
}
return super.getStateForNeighborUpdate(state, direction, neighborState, world, pos, neighborPos);
}

public static boolean canConnect(BlockView world, BlockPos blockPos) {
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"depends": {
"fabricloader": "*",
"fabric": "*",
"minecraft": "*"
"minecraft": "*",
"libblockattributes": "*"
}
}

0 comments on commit b52918f

Please sign in to comment.