public class RepeaterBlock extends AbstractRedstoneGateBlock
Block.NeighborGroupAbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>| Modifier and Type | Field and Description |
|---|---|
static IntProperty |
DELAY |
static BooleanProperty |
LOCKED |
POWERED, SHAPEFACINGLOGGER, STATE_IDS, stateManagercollidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier| Modifier | Constructor and Description |
|---|---|
protected |
RepeaterBlock(AbstractBlock.Settings settings) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendProperties(StateManager.Builder<Block,BlockState> builder) |
BlockState |
getPlacementState(ItemPlacementContext ctx) |
BlockState |
getStateForNeighborUpdate(BlockState state,
Direction direction,
BlockState newState,
WorldAccess world,
BlockPos pos,
BlockPos posFrom) |
protected int |
getUpdateDelayInternal(BlockState state) |
boolean |
isLocked(WorldView worldView,
BlockPos pos,
BlockState state) |
protected boolean |
isValidInput(BlockState state) |
ActionResult |
onUse(BlockState state,
World world,
BlockPos pos,
PlayerEntity player,
Hand hand,
BlockHitResult hit)
Called when this block is used by a player.
|
void |
randomDisplayTick(BlockState state,
World world,
BlockPos pos,
Random random) |
canPlaceAt, emitsRedstonePower, getInputLevel, getMaxInputLevelSides, getOutlineShape, getOutputLevel, getPower, getStrongRedstonePower, getWeakRedstonePower, hasPower, isRedstoneGate, isTargetNotAligned, neighborUpdate, onBlockAdded, onPlaced, onStateReplaced, scheduledTick, updatePowered, updateTargetmirror, rotateaddStacksForDisplay, afterBreak, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getRawIdFromState, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, is, isFaceFullSquare, isIn, isShapeFullCube, isTranslucent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onSteppedOn, postProcessState, pushEntitiesUpBeforeBlockChange, rainTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toStringcalcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canReplace, createScreenHandlerFactory, getAmbientOcclusionLightLevel, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMaterialColor, getDroppedStacks, getFluidState, getLootTableId, getOffsetType, getOpacity, getPistonBehavior, getRaycastShape, getRenderingSeed, getRenderType, getSidesShape, getVisualShape, hasBlockEntity, hasComparatorOutput, hasSidedTransparency, isSideInvisible, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onSyncedBlockEvent, prepare, randomTickpublic static final BooleanProperty LOCKED
public static final IntProperty DELAY
protected RepeaterBlock(AbstractBlock.Settings settings)
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit)
This method is called on both the logical client and logical server, so take caution when overriding this method.
The logical side can be checked using world.isClient().
If the action result is successful on a logical client, then the action will be sent to the logical server for processing.
onUse in class AbstractBlockprotected int getUpdateDelayInternal(BlockState state)
getUpdateDelayInternal in class AbstractRedstoneGateBlockpublic BlockState getPlacementState(ItemPlacementContext ctx)
getPlacementState in class AbstractRedstoneGateBlockpublic BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom)
getStateForNeighborUpdate in class AbstractBlockpublic boolean isLocked(WorldView worldView, BlockPos pos, BlockState state)
isLocked in class AbstractRedstoneGateBlockprotected boolean isValidInput(BlockState state)
isValidInput in class AbstractRedstoneGateBlock@Environment(value=CLIENT) public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random random)
randomDisplayTick in class Blockprotected void appendProperties(StateManager.Builder<Block,BlockState> builder)
appendProperties in class Block