Interface IDynamicRedstone
- All Known Implementing Classes:
DynamicRedstoneDefault,DynamicRedstoneHolderGlobal.DynamicRedstoneVirtual,DynamicRedstoneTileMultipartTicking
public interface IDynamicRedstone
Capability that can have its redstone level updated and stored.
-
Method Summary
Modifier and TypeMethodDescriptionintintGet the redstone level.booleanIf this side allows redstone to be inputted.booleanisDirect()voidsetAllowRedstoneInput(boolean allow) Set if this side allows redstone to be inputted.voidsetLastPulseValue(int value) Store the last value that was used to trigger a redstone pulse.voidsetRedstoneLevel(int level, boolean direct) Set the redstone level.
-
Method Details
-
setRedstoneLevel
void setRedstoneLevel(int level, boolean direct) Set the redstone level.- Parameters:
level- The redstone level.direct- If the redstone power should be direct.
-
getRedstoneLevel
int getRedstoneLevel()Get the redstone level.- Returns:
- The redstone level.
-
isDirect
boolean isDirect()- Returns:
- If the redstone power is direct.
-
setAllowRedstoneInput
void setAllowRedstoneInput(boolean allow) Set if this side allows redstone to be inputted.- Parameters:
allow- If it allows input.
-
isAllowRedstoneInput
boolean isAllowRedstoneInput()If this side allows redstone to be inputted.- Returns:
- If it allows input.
-
setLastPulseValue
void setLastPulseValue(int value) Store the last value that was used to trigger a redstone pulse.- Parameters:
value- A pulse value.
-
getLastPulseValue
int getLastPulseValue()- Returns:
- The last pulse value.
-