Class RedStoneWireBlock
java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
net.minecraft.world.level.block.RedStoneWireBlock
- All Implemented Interfaces:
FeatureElement, ItemLike, IBlockExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class Block
Block.UpdateFlagsNested classes/interfaces inherited from class BlockBehaviour
BlockBehaviour.BlockStateBase, BlockBehaviour.OffsetFunction, BlockBehaviour.OffsetType, BlockBehaviour.PostProcess, BlockBehaviour.Properties, BlockBehaviour.StateArgumentPredicate<A>, BlockBehaviour.StatePredicate -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MapCodec<RedStoneWireBlock> private static final int[]private final BlockStatestatic final EnumProperty<RedstoneSide> private final RedstoneWireEvaluatorstatic final EnumProperty<RedstoneSide> private static final floatstatic final IntegerPropertystatic final Map<Direction, EnumProperty<RedstoneSide>> private final Function<BlockState, VoxelShape> private booleanstatic final EnumProperty<RedstoneSide> static final EnumProperty<RedstoneSide> Fields inherited from class Block
BLOCK_STATE_REGISTRY, INDESTRUCTIBLE, INSTANT, stateDefinition, UPDATE_ALL, UPDATE_ALL_IMMEDIATE, UPDATE_CLIENTS, UPDATE_IMMEDIATE, UPDATE_INVISIBLE, UPDATE_KNOWN_SHAPE, UPDATE_LIMIT, UPDATE_MOVE_BY_PISTON, UPDATE_NEIGHBORS, UPDATE_NONE, UPDATE_SKIP_ALL_SIDEEFFECTS, UPDATE_SKIP_BLOCK_ENTITY_SIDEEFFECTS, UPDATE_SKIP_ON_PLACE, UPDATE_SKIP_SHAPE_UPDATE_ON_WIRE, UPDATE_SUPPRESS_DROPSFields inherited from class BlockBehaviour
descriptionId, drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, properties, requiredFeatures, soundType, speedFactor, UPDATE_SHAPE_ORDERFields inherited from interface FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaffectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston) voidanimateTick(BlockState state, Level level, BlockPos pos, RandomSource random) protected booleancanSurvive(BlockState state, LevelReader level, BlockPos pos) private booleancanSurviveOn(BlockGetter level, BlockPos relativePos, BlockState relativeState) private voidcheckCornerChangeAt(Level level, BlockPos pos) codec()protected voidintgetBlockSignal(Level level, BlockPos pos) static intgetColorForPower(int power) private RedstoneSidegetConnectingSide(BlockGetter level, BlockPos pos, Direction direction) private RedstoneSidegetConnectingSide(BlockGetter level, BlockPos pos, Direction direction, boolean canConnectUp) private BlockStategetConnectionState(BlockGetter level, BlockState state, BlockPos pos) protected intgetDirectSignal(BlockState state, BlockGetter level, BlockPos pos, Direction direction) private BlockStategetMissingConnections(BlockGetter level, BlockState state, BlockPos pos) protected VoxelShapegetShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) protected intgetSignal(BlockState state, BlockGetter level, BlockPos pos, Direction direction) getStateForPlacement(BlockPlaceContext context) private static booleanisCross(BlockState state) private static booleanisDot(BlockState state) protected booleanisSignalSource(BlockState state) private Function<BlockState, VoxelShape> protected BlockStatemirror(BlockState state, Mirror mirror) protected voidneighborChanged(BlockState state, Level level, BlockPos pos, Block block, @Nullable Orientation orientation, boolean movedByPiston) protected voidonPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean movedByPiston) protected BlockStaterotate(BlockState state, Rotation rotation) protected static booleanshouldConnectTo(BlockState blockState) protected static booleanshouldConnectTo(BlockState blockState, @Nullable Direction direction) private static voidspawnParticlesAlongLine(Level level, RandomSource random, BlockPos pos, int color, Direction side, Direction along, float from, float to) protected voidupdateIndirectNeighbourShapes(BlockState state, LevelAccessor level, BlockPos pos, int updateFlags, int updateLimit) private voidupdateNeighborsOfNeighboringWires(Level level, BlockPos pos) private voidupdatePowerStrength(Level level, BlockPos pos, BlockState state, @Nullable Orientation orientation, boolean shapeUpdateWiresAroundInitialPosition) protected BlockStateupdateShape(BlockState state, LevelReader level, ScheduledTickAccess ticks, BlockPos pos, Direction directionToNeighbour, BlockPos neighbourPos, BlockState neighbourState, RandomSource random) private voidupdatesOnShapeChange(Level level, BlockPos pos, BlockState oldState, BlockState newState) private static booleanuseExperimentalEvaluator(Level level) protected InteractionResultuseWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) Methods inherited from class Block
asBlock, asItem, box, boxes, boxZ, boxZ, boxZ, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, column, column, cube, cube, defaultBlockState, destroy, dropFromBlockInteractLootTable, dropFromExplosion, dropFromLootTable, dropResources, dropResources, dropResources, fallOn, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getShapeForEachState, getShapeForEachState, getSpeedFactor, getStateDefinition, handlePrecipitation, hasDynamicShape, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isShapeFullBlock, playerDestroy, playerWillDestroy, popExperience, popResource, popResourceFromFace, pushEntitiesUp, registerDefaultState, setPlacedBy, shouldRenderFace, shouldRenderFace, spawnDestroyParticles, stateById, stepOn, toString, tryDropExperience, updateEntityMovementAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOfMethods inherited from class BlockBehaviour
attack, canBeReplaced, canBeReplaced, defaultDestroyTime, defaultMapColor, entityInside, getAnalogOutputSignal, getBlockSupportShape, getCloneItemStack, getCollisionShape, getDescriptionId, getDestroyProgress, getDrops, getEntityInsideCollisionShape, getFluidState, getInteractionShape, getLightDampening, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getRenderShape, getSeed, getShadeBrightness, getSoundType, getVisualShape, hasAnalogOutputSignal, isAir, isCollisionShapeFullBlock, isPathfindable, isRandomlyTicking, onExplosionHit, onProjectileHit, propagatesSkylightDown, properties, propertiesCodec, randomTick, requiredFeatures, shouldChangedStateKeepBlockEntity, simpleCodec, skipRendering, spawnAfterBreak, tick, triggerEvent, useItemOn, useShapeForLightOcclusionMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface FeatureElement
isEnabledMethods inherited from interface IBlockExtension
addLandingEffects, addRunningEffects, canBeHydrated, canConnectRedstone, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, canSustainPlant, collisionExtendsVertically, getAdjacentBlockPathType, getAppearance, getBeaconColorMultiplier, getBedDirection, getBlockPathType, getBubbleColumnDirection, getCloneItemStack, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFriction, getLightEmission, getMapColor, getPistonPushReaction, getRespawnPosition, getSoundType, getStateAtViewpoint, getToolModifiedState, getWeakChanges, hasDynamicLightEmission, hidesNeighborFace, ignitedByLava, isBed, isBurning, isConduitFrame, isEmpty, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, makesOpenTrapdoorAboveClimbable, onBlockExploded, onBlockStateChange, onCaughtFire, onDestroyedByPlayer, onDestroyedByPushReaction, onNeighborChange, onTreeGrow, playFallSound, playStepSound, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay, shouldHideAdjacentFluidFace, supportsExternalFaceHiding
-
Field Details
-
CODEC
-
NORTH
-
EAST
-
SOUTH
-
WEST
-
POWER
-
PROPERTY_BY_DIRECTION
-
COLORS
private static final int[] COLORS -
PARTICLE_DENSITY
private static final float PARTICLE_DENSITY- See Also:
-
shapes
-
crossState
-
evaluator
-
shouldSignal
private boolean shouldSignal
-
-
Constructor Details
-
RedStoneWireBlock
-
-
Method Details
-
codec
-
makeShapes
-
getShape
protected VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) - Overrides:
getShapein classBlockBehaviour
-
getStateForPlacement
- Overrides:
getStateForPlacementin classBlock
-
getConnectionState
-
getMissingConnections
-
updateShape
protected BlockState updateShape(BlockState state, LevelReader level, ScheduledTickAccess ticks, BlockPos pos, Direction directionToNeighbour, BlockPos neighbourPos, BlockState neighbourState, RandomSource random) - Overrides:
updateShapein classBlockBehaviour
-
isCross
-
isDot
-
updateIndirectNeighbourShapes
protected void updateIndirectNeighbourShapes(BlockState state, LevelAccessor level, BlockPos pos, int updateFlags, int updateLimit) - Overrides:
updateIndirectNeighbourShapesin classBlockBehaviour
-
getConnectingSide
-
getConnectingSide
private RedstoneSide getConnectingSide(BlockGetter level, BlockPos pos, Direction direction, boolean canConnectUp) -
canSurvive
- Overrides:
canSurvivein classBlockBehaviour
-
canSurviveOn
-
updatePowerStrength
private void updatePowerStrength(Level level, BlockPos pos, BlockState state, @Nullable Orientation orientation, boolean shapeUpdateWiresAroundInitialPosition) -
getBlockSignal
-
checkCornerChangeAt
-
onPlace
protected void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean movedByPiston) - Overrides:
onPlacein classBlockBehaviour
-
affectNeighborsAfterRemoval
protected void affectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston) - Overrides:
affectNeighborsAfterRemovalin classBlockBehaviour
-
updateNeighborsOfNeighboringWires
-
neighborChanged
protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block block, @Nullable Orientation orientation, boolean movedByPiston) - Overrides:
neighborChangedin classBlockBehaviour
-
useExperimentalEvaluator
-
getDirectSignal
protected int getDirectSignal(BlockState state, BlockGetter level, BlockPos pos, Direction direction) - Overrides:
getDirectSignalin classBlockBehaviour
-
getSignal
- Overrides:
getSignalin classBlockBehaviour
-
shouldConnectTo
-
shouldConnectTo
-
isSignalSource
- Overrides:
isSignalSourcein classBlockBehaviour
-
getColorForPower
public static int getColorForPower(int power) -
spawnParticlesAlongLine
private static void spawnParticlesAlongLine(Level level, RandomSource random, BlockPos pos, int color, Direction side, Direction along, float from, float to) -
animateTick
- Overrides:
animateTickin classBlock
-
rotate
- Overrides:
rotatein classBlockBehaviour
-
mirror
- Overrides:
mirrorin classBlockBehaviour
-
createBlockStateDefinition
- Overrides:
createBlockStateDefinitionin classBlock
-
useWithoutItem
protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) - Overrides:
useWithoutItemin classBlockBehaviour
-
updatesOnShapeChange
private void updatesOnShapeChange(Level level, BlockPos pos, BlockState oldState, BlockState newState)
-