Skip to content

Commit

Permalink
feat(block/family): add default implementation forwarding to JOML API
Browse files Browse the repository at this point in the history
Contributes to #3832
  • Loading branch information
skaldarnar committed Jan 30, 2021
1 parent 46c88d7 commit 5ac69c5
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ public MultiConnectFamily(BlockFamilyDefinition definition, BlockBuilderHelper b
* Use the JOML implementation instead: {@link #connectionCondition(Vector3ic, Side)}.
*/
@Deprecated
protected abstract boolean connectionCondition(Vector3i blockLocation, Side connectSide);
protected boolean connectionCondition(Vector3i blockLocation, Side connectSide) {
return connectionCondition(JomlUtil.from(blockLocation), connectSide);
}

/**
* A condition to return true if the block should have a connection on the given side
Expand All @@ -103,7 +105,6 @@ public MultiConnectFamily(BlockFamilyDefinition definition, BlockBuilderHelper b
*/
protected abstract boolean connectionCondition(Vector3ic blockLocation, Side connectSide);


/**
* The sides of the block that can be connected to.
* Example: In a family like RomanColumn, this method only returns SideBitFlag.getSides(Side.TOP, Side.BOTTOM)
Expand Down

0 comments on commit 5ac69c5

Please sign in to comment.