public class ModuleRedstone extends TubeModule implements INetworkedModule
| Modifier and Type | Class and Description |
|---|---|
static class |
ModuleRedstone.EnumRedstoneDirection |
static class |
ModuleRedstone.Operation |
| Modifier and Type | Field and Description |
|---|---|
float |
extension |
float |
lastExtension |
advancedConfig, dir, higherBound, lowerBound, MAX_VALUE, pressureTube, shouldDrop, upgraded| Constructor and Description |
|---|
ModuleRedstone(ItemTubeModule itemTubeModule) |
| Modifier and Type | Method and Description |
|---|---|
void |
addInfo(java.util.List<net.minecraft.util.text.ITextComponent> curInfo) |
int |
getColorChannel() |
int |
getConstantVal() |
protected double |
getHeight()
Get the module's height (in range 0..16 as passed to
Block.box(double, double, double, double, double, double) |
int |
getInputLevel() |
ModuleRedstone.Operation |
getOperation() |
int |
getOtherColor() |
ModuleRedstone.EnumRedstoneDirection |
getRedstoneDirection() |
int |
getRedstoneLevel() |
double |
getWidth()
Get the module's width (in range 0..16 as passed to
Block.box(double, double, double, double, double, double) |
boolean |
hasGui()
Does this module have a gui? Server also needs to know about this, since module GUI's are opened in response
to a packet from the server.
|
boolean |
isComparatorInput() |
boolean |
isInverted() |
boolean |
onActivated(net.minecraft.entity.player.PlayerEntity player,
net.minecraft.util.Hand hand) |
void |
onNeighborBlockUpdate() |
void |
onNeighborTileUpdate() |
void |
readFromNBT(net.minecraft.nbt.CompoundNBT tag) |
void |
setColorChannel(int channel) |
void |
setComparatorInput(boolean comparatorInput) |
void |
setInputLevel(int level) |
void |
setInverted(boolean inverted) |
void |
setOperation(ModuleRedstone.Operation operation,
int otherColor,
int constantVal) |
boolean |
setOutputLevel(int level) |
void |
setRedstoneDirection(ModuleRedstone.EnumRedstoneDirection redstoneDirection) |
void |
update() |
net.minecraft.nbt.CompoundNBT |
writeToNBT(net.minecraft.nbt.CompoundNBT tag) |
canUpgrade, equals, getDirection, getDrops, getItem, getRenderBoundingBox, getShape, getThreshold, getTube, getType, hashCode, isFake, isInline, isUpgraded, markFake, onPlaced, onRemoved, sendDescriptionPacket, setDirection, setTube, updateNeighbors, upgradepublic ModuleRedstone(ItemTubeModule itemTubeModule)
public boolean hasGui()
TubeModulehasGui in class TubeModulepublic void onNeighborBlockUpdate()
onNeighborBlockUpdate in class TubeModulepublic void onNeighborTileUpdate()
onNeighborTileUpdate in class TubeModulepublic double getWidth()
TubeModuleBlock.box(double, double, double, double, double, double)getWidth in class TubeModuleprotected double getHeight()
TubeModuleBlock.box(double, double, double, double, double, double)getHeight in class TubeModulepublic void update()
update in class TubeModulepublic net.minecraft.nbt.CompoundNBT writeToNBT(net.minecraft.nbt.CompoundNBT tag)
writeToNBT in class TubeModulepublic void readFromNBT(net.minecraft.nbt.CompoundNBT tag)
readFromNBT in class TubeModulepublic ModuleRedstone.EnumRedstoneDirection getRedstoneDirection()
public void setRedstoneDirection(ModuleRedstone.EnumRedstoneDirection redstoneDirection)
public int getRedstoneLevel()
getRedstoneLevel in class TubeModulepublic boolean setOutputLevel(int level)
public int getInputLevel()
public void setInputLevel(int level)
public int getColorChannel()
getColorChannel in interface INetworkedModulepublic void setColorChannel(int channel)
setColorChannel in interface INetworkedModulepublic boolean isInverted()
public void setInverted(boolean inverted)
public boolean isComparatorInput()
public void setComparatorInput(boolean comparatorInput)
public void addInfo(java.util.List<net.minecraft.util.text.ITextComponent> curInfo)
addInfo in class TubeModulepublic boolean onActivated(net.minecraft.entity.player.PlayerEntity player,
net.minecraft.util.Hand hand)
onActivated in class TubeModulepublic ModuleRedstone.Operation getOperation()
public int getOtherColor()
public int getConstantVal()
public void setOperation(ModuleRedstone.Operation operation, int otherColor, int constantVal)