public class RedstoneWireBlock extends Block
Block.NeighborGroupAbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>| Modifier and Type | Field and Description |
|---|---|
private Set<BlockPos> |
affectedNeighbors |
static Map<Direction,EnumProperty<WireConnection>> |
DIRECTION_TO_WIRE_CONNECTION_PROPERTY |
static IntProperty |
POWER |
static EnumProperty<WireConnection> |
WIRE_CONNECTION_EAST |
static EnumProperty<WireConnection> |
WIRE_CONNECTION_NORTH |
static EnumProperty<WireConnection> |
WIRE_CONNECTION_SOUTH |
static EnumProperty<WireConnection> |
WIRE_CONNECTION_WEST |
protected static VoxelShape[] |
WIRE_CONNECTIONS_TO_SHAPE |
private boolean |
wiresGivePower |
LOGGER, STATE_IDS, stateManagercollidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier| Constructor and Description |
|---|
RedstoneWireBlock(AbstractBlock.Settings settings) |
addStacksForDisplay, afterBreak, asBlock, asItem, buildTooltip, 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, isFaceFullSquare, isIn, isShapeFullCube, isSideSolidFullSquare, isTranslucent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, pushEntitiesUpBeforeBlockChange, rainTick, replaceBlock, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toStringcalcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canReplace, createScreenHandlerFactory, getAmbientOcclusionLightLevel, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMaterialColor, getDroppedStacks, getFluidState, getLootTableId, getOffsetType, getOpacity, getPistonBehavior, getRayTraceShape, getRenderingSeed, getRenderType, getSidesShape, getVisualShape, hasBlockEntity, hasComparatorOutput, hasSidedTransparency, isSideInvisible, onBlockAction, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onUse, randomTick, scheduledTickpublic static final EnumProperty<WireConnection> WIRE_CONNECTION_NORTH
public static final EnumProperty<WireConnection> WIRE_CONNECTION_EAST
public static final EnumProperty<WireConnection> WIRE_CONNECTION_SOUTH
public static final EnumProperty<WireConnection> WIRE_CONNECTION_WEST
public static final IntProperty POWER
public static final Map<Direction,EnumProperty<WireConnection>> DIRECTION_TO_WIRE_CONNECTION_PROPERTY
protected static final VoxelShape[] WIRE_CONNECTIONS_TO_SHAPE
private boolean wiresGivePower
public RedstoneWireBlock(AbstractBlock.Settings settings)
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)
getOutlineShape in class AbstractBlockprivate static int getWireConnectionMask(BlockState state)
public BlockState getPlacementState(ItemPlacementContext ctx)
getPlacementState in class Blockpublic BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, IWorld world, BlockPos pos, BlockPos posFrom)
getStateForNeighborUpdate in class AbstractBlockpublic void prepare(BlockState state, IWorld world, BlockPos pos, int flags)
prepare in class AbstractBlockprivate WireConnection getRenderConnectionType(BlockView world, BlockPos pos, Direction dir)
public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos)
canPlaceAt in class AbstractBlockprivate BlockState update(World world, BlockPos pos, BlockState state)
private BlockState updateLogic(World world, BlockPos pos, BlockState state)
public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify)
onBlockAdded in class AbstractBlockpublic void onBlockRemoved(BlockState state, World world, BlockPos pos, BlockState newState, boolean notify)
onBlockRemoved in class AbstractBlockprivate int increasePower(int power,
BlockState state)
public void neighborUpdate(BlockState state, World world, BlockPos pos, Block block, BlockPos fromPos, boolean notify)
neighborUpdate in class AbstractBlockpublic int getStrongRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction)
getStrongRedstonePower in class AbstractBlockpublic int getWeakRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction)
getWeakRedstonePower in class AbstractBlockprotected static boolean connectsTo(BlockState state)
protected static boolean connectsTo(BlockState state, @Nullable Direction dir)
public boolean emitsRedstonePower(BlockState state)
emitsRedstonePower in class AbstractBlock@Environment(value=CLIENT) public static int getWireColor(int powerLevel)
@Environment(value=CLIENT) public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random random)
randomDisplayTick in class Blockpublic BlockState rotate(BlockState state, BlockRotation rotation)
rotate in class AbstractBlockpublic BlockState mirror(BlockState state, BlockMirror mirror)
mirror in class AbstractBlockprotected void appendProperties(StateManager.Builder<Block,BlockState> builder)
appendProperties in class Block