Package net.minecraft.block
Class RedstoneWireBlock
java.lang.Object
net.minecraft.block.AbstractBlock
net.minecraft.block.Block
net.minecraft.block.RedstoneWireBlock
- All Implemented Interfaces:
ItemConvertible
public class RedstoneWireBlock extends Block
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.NeighborGroup
Nested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>
-
Field Summary
Fields Modifier and Type Field Description static Map<Direction,EnumProperty<WireConnection>>
DIRECTION_TO_WIRE_CONNECTION_PROPERTY
private static VoxelShape
DOT_SHAPE
private BlockState
dotState
private static Map<Direction,VoxelShape>
field_24414
private static Map<Direction,VoxelShape>
field_24415
private static Map<BlockState,VoxelShape>
field_24416
private static Vec3d[]
field_24466
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
private boolean
wiresGivePower
Fields inherited from class net.minecraft.block.Block
LOGGER, STATE_IDS, stateManager
Fields inherited from class net.minecraft.block.AbstractBlock
collidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier
-
Constructor Summary
Constructors Constructor Description RedstoneWireBlock(AbstractBlock.Settings settings)
-
Method Summary
Methods inherited from class net.minecraft.block.Block
addStacksForDisplay, 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, isFaceFullSquare, isShapeFullCube, isTranslucent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toString
Methods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canReplace, createScreenHandlerFactory, getAmbientOcclusionLightLevel, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getFluidState, getLootTableId, getMaxModelOffset, getOffsetType, getOpacity, getPistonBehavior, getRaycastShape, getRenderingSeed, getRenderType, getSidesShape, getVisualShape, hasComparatorOutput, hasSidedTransparency, isSideInvisible, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onSyncedBlockEvent, randomTick, scheduledTick
-
Field Details
-
WIRE_CONNECTION_NORTH
-
WIRE_CONNECTION_EAST
-
WIRE_CONNECTION_SOUTH
-
WIRE_CONNECTION_WEST
-
POWER
-
DIRECTION_TO_WIRE_CONNECTION_PROPERTY
public static final Map<Direction,EnumProperty<WireConnection>> DIRECTION_TO_WIRE_CONNECTION_PROPERTY -
DOT_SHAPE
-
field_24414
-
field_24415
-
field_24416
-
field_24466
-
dotState
-
wiresGivePower
private boolean wiresGivePower
-
-
Constructor Details
-
RedstoneWireBlock
-
-
Method Details
-
method_27845
-
getOutlineShape
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)- Overrides:
getOutlineShape
in classAbstractBlock
-
getPlacementState
- Overrides:
getPlacementState
in classBlock
-
getPlacementState
-
method_27843
-
getStateForNeighborUpdate
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom)- Overrides:
getStateForNeighborUpdate
in classAbstractBlock
-
isFullyConnected
-
isNotConnected
-
prepare
public void prepare(BlockState state, WorldAccess world, BlockPos pos, int flags, int maxUpdateDepth)- Overrides:
prepare
in classAbstractBlock
-
getRenderConnectionType
-
getRenderConnectionType
private WireConnection getRenderConnectionType(BlockView world, BlockPos pos, Direction direction, boolean bool) -
canPlaceAt
- Overrides:
canPlaceAt
in classAbstractBlock
-
canRunOnTop
-
update
-
getReceivedRedstonePower
-
increasePower
-
updateNeighbors
-
onBlockAdded
public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify)- Overrides:
onBlockAdded
in classAbstractBlock
-
onStateReplaced
public void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved)Called inWorldChunk.setBlockState(BlockPos, BlockState, boolean)
ifnewState
is different fromstate
. Vanilla blocks perform removal cleanups here.- Overrides:
onStateReplaced
in classAbstractBlock
-
method_27844
-
neighborUpdate
public void neighborUpdate(BlockState state, World world, BlockPos pos, Block block, BlockPos fromPos, boolean notify)- Overrides:
neighborUpdate
in classAbstractBlock
-
getStrongRedstonePower
public int getStrongRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction)- Overrides:
getStrongRedstonePower
in classAbstractBlock
-
getWeakRedstonePower
public int getWeakRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction)- Overrides:
getWeakRedstonePower
in classAbstractBlock
-
connectsTo
-
connectsTo
-
emitsRedstonePower
- Overrides:
emitsRedstonePower
in classAbstractBlock
-
getWireColor
@Environment(CLIENT) public static int getWireColor(int powerLevel) -
method_27936
-
randomDisplayTick
@Environment(CLIENT) public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random random)- Overrides:
randomDisplayTick
in classBlock
-
rotate
Applies a block rotation to a block state.By default, this returns the provided block state.
- Overrides:
rotate
in classAbstractBlock
- Returns:
- the rotated block state
-
mirror
- Overrides:
mirror
in classAbstractBlock
-
appendProperties
- Overrides:
appendProperties
in classBlock
-
onUse
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit)Called when this block is used by a player. This, by default, is bound to using the right mouse button.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.
- Overrides:
onUse
in classAbstractBlock
- Returns:
- an action result that specifies if using the block was successful.
-
method_28482
private void method_28482(World world, BlockPos pos, BlockState blockState, BlockState blockState2)
-