net.minecraft.block

public class RedstoneWireBlock

extends Block

All mapped superinterfaces:

ToggleableFeature, ItemConvertible

net.minecraft.world.level.block.RedStoneWireBlock
net.minecraft.class_2457
net.minecraft.block.RedstoneWireBlock

Field summary

Modifier and TypeField
public static final EnumProperty<WireConnection>
NORTH
field_11440
WIRE_CONNECTION_NORTH
public static final EnumProperty<WireConnection>
EAST
field_11436
WIRE_CONNECTION_EAST
public static final EnumProperty<WireConnection>
SOUTH
field_11437
WIRE_CONNECTION_SOUTH
public static final EnumProperty<WireConnection>
WEST
field_11439
WIRE_CONNECTION_WEST
public static final IntProperty
POWER
field_11432
POWER
public static final Map<Direction, EnumProperty<WireConnection>>
PROPERTY_BY_DIRECTION
field_11435
DIRECTION_TO_WIRE_CONNECTION_PROPERTY
private static final int[]
COLORS
field_24466
COLORS
private static final float
PARTICLE_DENSITY
field_31221
field_31221
private final Function<BlockState, VoxelShape>
shapes
field_55787
shapeFunction
private final BlockState
crossState
field_24733
dotState
private final RedstoneController
evaluator
field_52632
redstoneController
private boolean
shouldSignal
field_11438
wiresGivePower

Constructor summary

ModifierConstructor
public (AbstractBlock$Settings properties)

Method summary

Modifier and TypeMethod
private Function<BlockState, VoxelShape>
makeShapes()
method_66462()
createShapeFunction()
protected VoxelShape
getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context)
method_9530(class_2680 arg0, class_1922 arg1, class_2338 arg2, class_3726 arg3)
getOutlineShape(BlockState arg0, BlockView arg1, BlockPos arg2, ShapeContext arg3)
public BlockState
getStateForPlacement(BlockPlaceContext context)
method_9605(class_1750 arg0)
getPlacementState(ItemPlacementContext arg0)
private BlockState
getConnectionState(BlockGetter level, BlockState state, BlockPos pos)
method_27840(class_1922 arg0, class_2680 arg1, class_2338 arg2)
getPlacementState(BlockView world, BlockState state, BlockPos pos)
private BlockState
getMissingConnections(BlockGetter level, BlockState state, BlockPos pos)
method_27843(class_1922 arg0, class_2680 arg1, class_2338 arg2)
getDefaultWireState(BlockView world, BlockState state, BlockPos pos)
protected BlockState
updateShape(BlockState state, LevelReader level, ScheduledTickAccess ticks, BlockPos pos, Direction directionToNeighbour, BlockPos neighbourPos, BlockState neighbourState, RandomSource random)
method_9559(class_2680 arg0, class_4538 arg1, class_10225 arg2, class_2338 arg3, class_2350 arg4, class_2338 arg5, class_2680 arg6, class_5819 arg7)
getStateForNeighborUpdate(BlockState arg0, WorldView arg1, ScheduledTickView arg2, BlockPos arg3, Direction arg4, BlockPos arg5, BlockState arg6, Random arg7)
private static boolean
isCross(BlockState state)
method_27846(class_2680 arg0)
isFullyConnected(BlockState state)
private static boolean
isDot(BlockState state)
method_28483(class_2680 arg0)
isNotConnected(BlockState state)
protected void
updateIndirectNeighbourShapes(BlockState state, LevelAccessor level, BlockPos pos, int updateFlags, int updateLimit)
method_9517(class_2680 arg0, class_1936 arg1, class_2338 arg2, int arg3, int arg4)
prepare(BlockState arg0, WorldAccess arg1, BlockPos arg2, int arg3, int arg4)
private WireConnection
getConnectingSide(BlockGetter level, BlockPos pos, Direction direction)
method_10477(class_1922 arg0, class_2338 arg1, class_2350 arg2)
getRenderConnectionType(BlockView world, BlockPos pos, Direction direction)
private WireConnection
getConnectingSide(BlockGetter level, BlockPos pos, Direction direction, boolean canConnectUp)
method_27841(class_1922 arg0, class_2338 arg1, class_2350 arg2, boolean arg3)
getRenderConnectionType(BlockView world, BlockPos pos, Direction direction, boolean arg3)
protected boolean
canSurvive(BlockState state, LevelReader level, BlockPos pos)
method_9558(class_2680 arg0, class_4538 arg1, class_2338 arg2)
canPlaceAt(BlockState arg0, WorldView arg1, BlockPos arg2)
private boolean
canSurviveOn(BlockGetter level, BlockPos relativePos, BlockState relativeState)
method_27937(class_1922 arg0, class_2338 arg1, class_2680 arg2)
canRunOnTop(BlockView world, BlockPos pos, BlockState floor)
private void
updatePowerStrength(Level level, BlockPos pos, BlockState state, Orientation orientation, boolean shapeUpdateWiresAroundInitialPosition)
method_10485(class_1937 arg0, class_2338 arg1, class_2680 arg2, class_9904 arg3, boolean arg4)
update(World world, BlockPos pos, BlockState state, WireOrientation orientation, boolean blockAdded)
public int
getBlockSignal(Level level, BlockPos pos)
method_61746(class_1937 arg0, class_2338 arg1)
getStrongPower(World world, BlockPos pos)
private void
checkCornerChangeAt(Level level, BlockPos pos)
method_10479(class_1937 arg0, class_2338 arg1)
updateNeighbors(World world, BlockPos pos)
protected void
onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean movedByPiston)
method_9615(class_2680 arg0, class_1937 arg1, class_2338 arg2, class_2680 arg3, boolean arg4)
onBlockAdded(BlockState arg0, World arg1, BlockPos arg2, BlockState arg3, boolean arg4)
protected void
affectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston)
method_66388(class_2680 arg0, class_3218 arg1, class_2338 arg2, boolean arg3)
onStateReplaced(BlockState arg0, ServerWorld arg1, BlockPos arg2, boolean arg3)
private void
updateNeighborsOfNeighboringWires(Level level, BlockPos pos)
method_27844(class_1937 arg0, class_2338 arg1)
updateOffsetNeighbors(World world, BlockPos pos)
protected void
neighborChanged(BlockState state, Level level, BlockPos pos, Block block, Orientation orientation, boolean movedByPiston)
method_9612(class_2680 arg0, class_1937 arg1, class_2338 arg2, class_2248 arg3, class_9904 arg4, boolean arg5)
neighborUpdate(BlockState arg0, World arg1, BlockPos arg2, Block arg3, WireOrientation arg4, boolean arg5)
private static boolean
useExperimentalEvaluator(Level level)
method_61745(class_1937 arg0)
areRedstoneExperimentsEnabled(World world)
protected int
getDirectSignal(BlockState state, BlockGetter level, BlockPos pos, Direction direction)
method_9603(class_2680 arg0, class_1922 arg1, class_2338 arg2, class_2350 arg3)
getStrongRedstonePower(BlockState arg0, BlockView arg1, BlockPos arg2, Direction arg3)
protected int
getSignal(BlockState state, BlockGetter level, BlockPos pos, Direction direction)
method_9524(class_2680 arg0, class_1922 arg1, class_2338 arg2, class_2350 arg3)
getWeakRedstonePower(BlockState arg0, BlockView arg1, BlockPos arg2, Direction arg3)
protected int
ownSignal(BlockState state, BlockGetter level, BlockPos pos)
method_1_5240(class_2680 arg0, class_1922 arg1, class_2338 arg2)
getWeakRedstonePower(BlockState arg0, BlockView arg1, BlockPos arg2)
protected static boolean
shouldConnectTo(BlockState blockState)
method_10484(class_2680 arg0)
connectsTo(BlockState state)
protected static boolean
shouldConnectTo(BlockState blockState, Direction direction)
method_10482(class_2680 arg0, class_2350 arg1)
connectsTo(BlockState state, Direction dir)
protected boolean
isSignalSource(BlockState state)
method_9506(class_2680 arg0)
emitsRedstonePower(BlockState arg0)
public static int
getColorForPower(int power)
method_10487(int arg0)
getWireColor(int powerLevel)
private static void
spawnParticlesAlongLine(Level level, RandomSource random, BlockPos pos, int color, Direction side, Direction along, float from, float to)
method_27936(class_1937 arg0, class_5819 arg1, class_2338 arg2, int arg3, class_2350 arg4, class_2350 arg5, float arg6, float arg7)
addPoweredParticles(World world, Random random, BlockPos pos, int color, Direction perpendicular, Direction direction, float minOffset, float maxOffset)
public void
animateTick(BlockState state, Level level, BlockPos pos, RandomSource random)
method_9496(class_2680 arg0, class_1937 arg1, class_2338 arg2, class_5819 arg3)
randomDisplayTick(BlockState arg0, World arg1, BlockPos arg2, Random arg3)
protected BlockState
rotate(BlockState state, Rotation rotation)
method_9598(class_2680 arg0, class_2470 arg1)
rotate(BlockState arg0, BlockRotation arg1)
protected BlockState
mirror(BlockState state, Mirror mirror)
method_9569(class_2680 arg0, class_2415 arg1)
mirror(BlockState arg0, BlockMirror arg1)
protected void
createBlockStateDefinition(StateDefinition$Builder<Block, BlockState> builder)
method_9515(class_2689$class_2690<class_2248, class_2680> arg0)
appendProperties(StateManager$Builder<Block, BlockState> arg0)
protected ActionResult
useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult)
method_55766(class_2680 arg0, class_1937 arg1, class_2338 arg2, class_1657 arg3, class_3965 arg4)
onUse(BlockState arg0, World arg1, BlockPos arg2, PlayerEntity arg3, BlockHitResult arg4)
private void
updatesOnShapeChange(Level level, BlockPos pos, BlockState oldState, BlockState newState)
method_28482(class_1937 arg0, class_2338 arg1, class_2680 arg2, class_2680 arg3)
updateForNewState(World world, BlockPos pos, BlockState oldState, BlockState newState)
private static VoxelShape
lambda$makeShapes$0(VoxelShape arg0, Map arg1, Map arg2, BlockState arg3)
method_66461(class_265 arg0, Map arg1, Map arg2, class_2680 arg3)
method_66461(VoxelShape arg0, Map arg1, Map arg2, BlockState state)
private static void
lambda$static$0(int[] arg0)
method_61747(int[] arg0)
method_61747(int[] colors)