public abstract class BlockBehaviorRedstoneDiode extends FloodableBlockBehavior
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
isPowered |
protected Identifier |
type |
| Constructor and Description |
|---|
BlockBehaviorRedstoneDiode(Identifier type) |
| Modifier and Type | Method and Description |
|---|---|
protected int |
calculateInputStrength(Block block) |
boolean |
canBeActivated(Block block) |
boolean |
canPassThrough() |
boolean |
canWaterlogFlowing() |
boolean |
canWaterlogSource() |
BlockColor |
getColor(Block block) |
protected abstract int |
getDelay(BlockState state) |
Direction |
getFacing(BlockState state) |
protected abstract BlockState |
getPowered(BlockState state) |
protected int |
getPowerOnSide(Block block,
com.nukkitx.math.vector.Vector3i pos,
Direction side) |
protected int |
getPowerOnSides(Block block) |
protected int |
getRedstoneSignal(Block block) |
int |
getStrongPower(Block block,
Direction side) |
protected abstract BlockState |
getUnpowered(BlockState state) |
int |
getWeakPower(Block block,
Direction side) |
protected boolean |
isAlternateInput(Block block) |
static boolean |
isDiode(BlockBehavior behavior) |
boolean |
isFacingTowardsRepeater(Block block) |
boolean |
isLocked(Block block) |
boolean |
isPowered(BlockState state) |
boolean |
isPowerSource(Block block) |
boolean |
onBreak(Block block,
Item item) |
int |
onUpdate(Block block,
int type) |
boolean |
place(Item item,
Block block,
Block target,
Direction face,
com.nukkitx.math.vector.Vector3f clickPos,
Player player) |
protected boolean |
shouldBePowered(Block block) |
void |
updateState(Block block) |
canBeFlooded, getBoundingBox, getHardness, getResistance, isSolidisTransparentaddVelocityToEntity, canBeBrokenWith, canBeClimbed, canBePlaced, canBePushed, canBeReplaced, canHarvestWithHand, canSilkTouch, clone, collidesWithBB, collidesWithBB, getBreakTime, getBreakTime, getBurnAbility, getBurnChance, getCollisionBoxes, getComparatorInputOverride, getDescriptionId, getDropExp, getDrops, getFilterLevel, getFrictionFactor, getLightLevel, getSaveId, getToolType, hasComparatorInputOverride, hasEntityCollision, isBreakable, isLiquid, isNormalBlock, onActivate, onActivate, onBreak, onEntityCollide, placeBlock, placeBlock, placeBlock, placeBlock, removeBlock, removeBlock, tickRate, toItemprotected final Identifier type
protected boolean isPowered
public BlockBehaviorRedstoneDiode(Identifier type)
public boolean onBreak(Block block, Item item)
onBreak in class BlockBehaviorpublic boolean place(Item item, Block block, Block target, Direction face, com.nukkitx.math.vector.Vector3f clickPos, Player player)
place in class BlockBehaviorpublic int onUpdate(Block block, int type)
onUpdate in class BlockBehaviorpublic void updateState(Block block)
public boolean isLocked(Block block)
protected int calculateInputStrength(Block block)
protected int getPowerOnSides(Block block)
protected int getPowerOnSide(Block block, com.nukkitx.math.vector.Vector3i pos, Direction side)
public boolean isPowerSource(Block block)
isPowerSource in class BlockBehaviorprotected boolean shouldBePowered(Block block)
public Direction getFacing(BlockState state)
protected abstract int getDelay(BlockState state)
protected abstract BlockState getUnpowered(BlockState state)
protected abstract BlockState getPowered(BlockState state)
public boolean canPassThrough()
canPassThrough in class FloodableBlockBehaviorprotected boolean isAlternateInput(Block block)
public static boolean isDiode(BlockBehavior behavior)
protected int getRedstoneSignal(Block block)
public int getStrongPower(Block block, Direction side)
getStrongPower in class BlockBehaviorpublic int getWeakPower(Block block, Direction side)
getWeakPower in class BlockBehaviorpublic boolean canBeActivated(Block block)
canBeActivated in class BlockBehaviorpublic boolean isPowered(BlockState state)
public boolean isFacingTowardsRepeater(Block block)
public BlockColor getColor(Block block)
getColor in class BlockBehaviorTransparentpublic boolean canWaterlogSource()
canWaterlogSource in class BlockBehaviorpublic boolean canWaterlogFlowing()
canWaterlogFlowing in class BlockBehaviorCopyright © 2020. All rights reserved.