Class RedstoneModule
java.lang.Object
me.desht.pneumaticcraft.common.tubemodules.AbstractTubeModule
me.desht.pneumaticcraft.common.tubemodules.RedstoneModule
- All Implemented Interfaces:
INetworkedModule
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enum -
Field Summary
FieldsFields inherited from class me.desht.pneumaticcraft.common.tubemodules.AbstractTubeModule
advancedConfig, dir, higherBound, lowerBound, MAX_VALUE, pressureTube, upgraded -
Constructor Summary
ConstructorsConstructorDescriptionRedstoneModule(net.minecraft.core.Direction dir, PressureTubeBlockEntity pressureTube) -
Method Summary
Modifier and TypeMethodDescriptionvoidintintprotected doubleGet the module's height (in range 0..16 as passed toBlock.box(double, double, double, double, double, double)intnet.minecraft.world.item.ItemgetItem()intintdoublegetWidth()Get the module's width (in range 0..16 as passed toBlock.box(double, double, double, double, double, double)booleanhasGui()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.booleanbooleanbooleanonActivated(net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand) voidvoidvoidreadFromNBT(net.minecraft.nbt.CompoundTag tag) voidsetColorChannel(int channel) voidsetComparatorInput(boolean comparatorInput) voidsetInputLevel(int level) voidsetInverted(boolean inverted) voidsetOperation(RedstoneModule.Operation operation, int otherColor, int constantVal) booleansetOutputLevel(int level) voidsetRedstoneDirection(RedstoneModule.EnumRedstoneDirection redstoneDirection) voidvoidnet.minecraft.nbt.CompoundTagwriteToNBT(net.minecraft.nbt.CompoundTag tag) Methods inherited from class me.desht.pneumaticcraft.common.tubemodules.AbstractTubeModule
canUpgrade, equals, getDirection, getDrops, getRenderBoundingBox, getShape, getThreshold, getTube, getType, hashCode, isFake, isInline, isInlineAndFocused, isUpgraded, isValid, markFake, onPlaced, onRemoved, sendDescriptionPacket, setChanged, tickCommon, updateNeighbors, upgrade
-
Field Details
-
extension
public float extension -
lastExtension
public float lastExtension
-
-
Constructor Details
-
RedstoneModule
-
-
Method Details
-
hasGui
public boolean hasGui()Description copied from class:AbstractTubeModuleDoes 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.- Overrides:
hasGuiin classAbstractTubeModule- Returns:
- true if the module has a gui
-
onNeighborBlockUpdate
public void onNeighborBlockUpdate()- Overrides:
onNeighborBlockUpdatein classAbstractTubeModule
-
onNeighborTileUpdate
public void onNeighborTileUpdate()- Overrides:
onNeighborTileUpdatein classAbstractTubeModule
-
getWidth
public double getWidth()Description copied from class:AbstractTubeModuleGet the module's width (in range 0..16 as passed toBlock.box(double, double, double, double, double, double)- Overrides:
getWidthin classAbstractTubeModule- Returns:
- the width
-
getHeight
protected double getHeight()Description copied from class:AbstractTubeModuleGet the module's height (in range 0..16 as passed toBlock.box(double, double, double, double, double, double)- Overrides:
getHeightin classAbstractTubeModule- Returns:
- the height
-
getItem
public net.minecraft.world.item.Item getItem()- Specified by:
getItemin classAbstractTubeModule
-
tickServer
public void tickServer()- Overrides:
tickServerin classAbstractTubeModule
-
tickClient
public void tickClient()- Overrides:
tickClientin classAbstractTubeModule
-
writeToNBT
public net.minecraft.nbt.CompoundTag writeToNBT(net.minecraft.nbt.CompoundTag tag) - Overrides:
writeToNBTin classAbstractTubeModule
-
readFromNBT
public void readFromNBT(net.minecraft.nbt.CompoundTag tag) - Overrides:
readFromNBTin classAbstractTubeModule
-
getRedstoneDirection
-
setRedstoneDirection
-
getRedstoneLevel
public int getRedstoneLevel()- Overrides:
getRedstoneLevelin classAbstractTubeModule
-
setOutputLevel
public boolean setOutputLevel(int level) -
getInputLevel
public int getInputLevel() -
setInputLevel
public void setInputLevel(int level) -
getColorChannel
public int getColorChannel()- Specified by:
getColorChannelin interfaceINetworkedModule
-
setColorChannel
public void setColorChannel(int channel) - Specified by:
setColorChannelin interfaceINetworkedModule
-
isInverted
public boolean isInverted() -
setInverted
public void setInverted(boolean inverted) -
isComparatorInput
public boolean isComparatorInput() -
setComparatorInput
public void setComparatorInput(boolean comparatorInput) -
addInfo
- Overrides:
addInfoin classAbstractTubeModule
-
onActivated
public boolean onActivated(net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand) - Overrides:
onActivatedin classAbstractTubeModule
-
getOperation
-
getOtherColor
public int getOtherColor() -
getConstantVal
public int getConstantVal() -
setOperation
-