public class RedstoneController<T extends net.minecraft.tileentity.TileEntity & IRedstoneControl<T>>
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
RedstoneController.EmittingRedstoneMode<T extends net.minecraft.tileentity.TileEntity & IRedstoneControl<T>> |
static class |
RedstoneController.ReceivingRedstoneMode<T extends net.minecraft.tileentity.TileEntity & IRedstoneControl<T>> |
static class |
RedstoneController.RedstoneMode<T extends net.minecraft.tileentity.TileEntity & IRedstoneControl<T>> |
| Constructor and Description |
|---|
RedstoneController(T te) |
RedstoneController(T te,
java.util.List<RedstoneController.RedstoneMode<T>> modes) |
| Modifier and Type | Method and Description |
|---|---|
void |
deserialize(net.minecraft.nbt.CompoundNBT tag) |
int |
getCurrentMode() |
int |
getCurrentRedstonePower() |
net.minecraft.util.text.ITextComponent |
getDescription() |
int |
getModeCount() |
RedstoneController.RedstoneMode<T> |
getModeDetails(int idx) |
net.minecraft.util.text.ITextComponent |
getRedstoneTabTitle() |
boolean |
isEmitter() |
boolean |
parseRedstoneMode(java.lang.String tag)
Attempt to parse a redstone tag string, as received by
IGUIButtonSensitive.handleGUIButtonPress(String, boolean, ServerPlayerEntity). |
void |
serialize(net.minecraft.nbt.CompoundNBT tag) |
void |
setCurrentMode(int currentMode) |
boolean |
shouldEmit() |
boolean |
shouldRun() |
void |
updateRedstonePower() |
public RedstoneController(T te)
public RedstoneController(T te, java.util.List<RedstoneController.RedstoneMode<T>> modes)
public int getModeCount()
public RedstoneController.RedstoneMode<T> getModeDetails(int idx)
public int getCurrentMode()
public void setCurrentMode(int currentMode)
public int getCurrentRedstonePower()
public boolean shouldRun()
public boolean shouldEmit()
public void serialize(net.minecraft.nbt.CompoundNBT tag)
public void deserialize(net.minecraft.nbt.CompoundNBT tag)
public boolean parseRedstoneMode(java.lang.String tag)
IGUIButtonSensitive.handleGUIButtonPress(String, boolean, ServerPlayerEntity).
If the tag can be parsed, then update the redstone mode for this controller to the integer mode parsed from the tag.tag - the string tag in the form "redstone:<int>"public void updateRedstonePower()
public boolean isEmitter()
public net.minecraft.util.text.ITextComponent getRedstoneTabTitle()
public net.minecraft.util.text.ITextComponent getDescription()