public abstract class AbstractRedstoneGateBlock extends HorizontalFacingBlock
Block.NeighborGroup
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>
Modifier and Type | Field and Description |
---|---|
static BooleanProperty |
POWERED |
protected static VoxelShape |
SHAPE |
FACING
LOGGER, STATE_IDS, stateManager
collidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier
Modifier | Constructor and Description |
---|---|
protected |
AbstractRedstoneGateBlock(AbstractBlock.Settings settings) |
mirror, rotate
addStacksForDisplay, afterBreak, appendProperties, 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, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toString
calcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canReplace, createScreenHandlerFactory, getAmbientOcclusionLightLevel, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMaterialColor, getDroppedStacks, getFluidState, getLootTableId, getOffsetType, getOpacity, getPistonBehavior, getRaycastShape, getRenderingSeed, getRenderType, getSidesShape, getStateForNeighborUpdate, getVisualShape, hasBlockEntity, hasComparatorOutput, hasSidedTransparency, isSideInvisible, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onSyncedBlockEvent, onUse, prepare, randomTick
protected static final VoxelShape SHAPE
public static final BooleanProperty POWERED
protected AbstractRedstoneGateBlock(AbstractBlock.Settings settings)
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)
getOutlineShape
in class AbstractBlock
public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos)
canPlaceAt
in class AbstractBlock
public void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random)
scheduledTick
in class AbstractBlock
public int getStrongRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction)
getStrongRedstonePower
in class AbstractBlock
public int getWeakRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction)
getWeakRedstonePower
in class AbstractBlock
public void neighborUpdate(BlockState state, World world, BlockPos pos, Block block, BlockPos fromPos, boolean notify)
neighborUpdate
in class AbstractBlock
protected void updatePowered(World world, BlockPos pos, BlockState state)
public boolean isLocked(WorldView worldView, BlockPos pos, BlockState state)
protected boolean hasPower(World world, BlockPos pos, BlockState state)
protected int getPower(World world, BlockPos pos, BlockState state)
protected int getMaxInputLevelSides(WorldView world, BlockPos pos, BlockState state)
public boolean emitsRedstonePower(BlockState state)
emitsRedstonePower
in class AbstractBlock
public BlockState getPlacementState(ItemPlacementContext ctx)
getPlacementState
in class Block
public void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack)
public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify)
onBlockAdded
in class AbstractBlock
public void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved)
WorldChunk.setBlockState(BlockPos, BlockState, boolean)
if newState
is different from state
. Vanilla blocks perform removal cleanups here.onStateReplaced
in class AbstractBlock
protected void updateTarget(World world, BlockPos pos, BlockState state)
protected boolean isValidInput(BlockState state)
protected int getOutputLevel(BlockView world, BlockPos pos, BlockState state)
public static boolean isRedstoneGate(BlockState state)
public boolean isTargetNotAligned(BlockView world, BlockPos pos, BlockState state)
protected abstract int getUpdateDelayInternal(BlockState state)