Skip to content

Commit

Permalink
add docs for interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
LemmaEOF committed Jul 18, 2018
1 parent 48fd5c3 commit 2059a57
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@
* This Capability describes an "inspection" signal value to InfraComparators.
*/
public interface IInfraComparator {
/**
* @return a value from 0-63 depending on the state of your object.
* It may be helpful to format the value in binaru: `0b00_0000`
*/
int getComparatorValue();
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,15 @@
* Version of IInfraComparator that can be implemented by non-TE Blocks.
*/
public interface ISimpleInfraComparator {

/**
* Has extra information from the standard IInfraComparator to compensate for not having a TE
* @param world the current world.
* @param pos the position of your object.
* @param state the current blockstate of your object.
* @param inspectingFrom the direction the infra-comparator is looking from.
* @return a value from 0-63 depending on the state of your object and the given parameters.
* It may be helpful to format the value in binaru: `0b00_0000`
*/
int getComparatorValue(World world, BlockPos pos, IBlockState state, EnumFacing inspectingFrom);
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,24 @@
* Version of IInfraRedstone that can be implemented by non-TE Blocks.
*/
public interface ISimpleInfraRedstone {
/**
* Has extra information from the standard IInfraRedstone to compensate for not having a TE.
* @param world the current world.
* @param pos the position of your object.
* @param state the current blockstate of your object.
* @param inspectingFrom the direction your object is being inspected from, to avoid scanning in the wrong direction.
* @return the signal value output by the module.
* It may be helpful to format the value in binary: `0b00_0000`
*/
int getSignalValue(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing inspectingFrom);

/**
* Checks for the ability to connect to modules and infra-redstone cables without having a capability itself.
* @param world the current world.
* @param pos the position of your object.
* @param state the current blockstate of your object.
* @param inspectingFrom the dirtection being tested for connectability
* @return whether it is possible to connect to the side being tested.
*/
boolean canConnectIR(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing inspectingFrom);
}

0 comments on commit 2059a57

Please sign in to comment.