Class DynamicRedstoneDefault
java.lang.Object
org.cyclops.integrateddynamics.capability.dynamicredstone.DynamicRedstoneDefault
- All Implemented Interfaces:
IDynamicRedstone
Default implementation of
IDynamicRedstone.-
Constructor Summary
Constructors -
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.
-
Constructor Details
-
DynamicRedstoneDefault
public DynamicRedstoneDefault()
-
-
Method Details
-
setRedstoneLevel
public void setRedstoneLevel(int level, boolean direct) Description copied from interface:IDynamicRedstoneSet the redstone level.- Specified by:
setRedstoneLevelin interfaceIDynamicRedstone- Parameters:
level- The redstone level.direct- If the redstone power should be direct.
-
getRedstoneLevel
public int getRedstoneLevel()Description copied from interface:IDynamicRedstoneGet the redstone level.- Specified by:
getRedstoneLevelin interfaceIDynamicRedstone- Returns:
- The redstone level.
-
isDirect
public boolean isDirect()- Specified by:
isDirectin interfaceIDynamicRedstone- Returns:
- If the redstone power is direct.
-
setAllowRedstoneInput
public void setAllowRedstoneInput(boolean allow) Description copied from interface:IDynamicRedstoneSet if this side allows redstone to be inputted.- Specified by:
setAllowRedstoneInputin interfaceIDynamicRedstone- Parameters:
allow- If it allows input.
-
isAllowRedstoneInput
public boolean isAllowRedstoneInput()Description copied from interface:IDynamicRedstoneIf this side allows redstone to be inputted.- Specified by:
isAllowRedstoneInputin interfaceIDynamicRedstone- Returns:
- If it allows input.
-
setLastPulseValue
public void setLastPulseValue(int value) Description copied from interface:IDynamicRedstoneStore the last value that was used to trigger a redstone pulse.- Specified by:
setLastPulseValuein interfaceIDynamicRedstone- Parameters:
value- A pulse value.
-
getLastPulseValue
public int getLastPulseValue()- Specified by:
getLastPulseValuein interfaceIDynamicRedstone- Returns:
- The last pulse value.
-