Package codechicken.multipart.api.tile
Interface RedstoneConnector
- All Known Subinterfaces:
RedstoneTile
- All Known Implementing Classes:
TRedstoneTile
public interface RedstoneConnector
Interface for tile entities which split their redstone connections into a mask for each side (edges and center)
All connection masks are a 5 bit map.
The lowest 4 bits correspond to the connection toward the face specified Rotation.rotateSide(side invalid input: '&' 6, b) where b is the bit index from lowest to highest.
Bit 5 corresponds to a connection opposite side.
-
Method Summary
Modifier and TypeMethodDescriptionintgetConnectionMask(int side) Returns the connection mask of this tile for the given side.intweakPowerLevel(int side, int mask) Returns the weak power level provided by this tile on the given side, through the given mask.
-
Method Details
-
getConnectionMask
int getConnectionMask(int side) Returns the connection mask of this tile for the given side.- Parameters:
side- The side index.- Returns:
- The connection mask.
-
weakPowerLevel
int weakPowerLevel(int side, int mask) Returns the weak power level provided by this tile on the given side, through the given mask.- Parameters:
side- The side index.mask- The connection mask.- Returns:
- The redstone signal.
-