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.NeighborGroupNested 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_PROPERTYprivate static VoxelShapeDOT_SHAPEprivate BlockStatedotStateprivate static Map<Direction,VoxelShape>field_24414private static Map<Direction,VoxelShape>field_24415private static Map<BlockState,VoxelShape>field_24416private static Vec3d[]field_24466static IntPropertyPOWERstatic EnumProperty<WireConnection>WIRE_CONNECTION_EASTstatic EnumProperty<WireConnection>WIRE_CONNECTION_NORTHstatic EnumProperty<WireConnection>WIRE_CONNECTION_SOUTHstatic EnumProperty<WireConnection>WIRE_CONNECTION_WESTprivate booleanwiresGivePowerFields inherited from class net.minecraft.block.Block
LOGGER, STATE_IDS, stateManagerFields 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, toStringMethods 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:
getOutlineShapein classAbstractBlock
-
getPlacementState
- Overrides:
getPlacementStatein classBlock
-
getPlacementState
-
method_27843
-
getStateForNeighborUpdate
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom)- Overrides:
getStateForNeighborUpdatein classAbstractBlock
-
isFullyConnected
-
isNotConnected
-
prepare
public void prepare(BlockState state, WorldAccess world, BlockPos pos, int flags, int maxUpdateDepth)- Overrides:
preparein classAbstractBlock
-
getRenderConnectionType
-
getRenderConnectionType
private WireConnection getRenderConnectionType(BlockView world, BlockPos pos, Direction direction, boolean bool) -
canPlaceAt
- Overrides:
canPlaceAtin classAbstractBlock
-
canRunOnTop
-
update
-
getReceivedRedstonePower
-
increasePower
-
updateNeighbors
-
onBlockAdded
public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify)- Overrides:
onBlockAddedin classAbstractBlock
-
onStateReplaced
public void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved)Called inWorldChunk.setBlockState(BlockPos, BlockState, boolean)ifnewStateis different fromstate. Vanilla blocks perform removal cleanups here.- Overrides:
onStateReplacedin classAbstractBlock
-
method_27844
-
neighborUpdate
public void neighborUpdate(BlockState state, World world, BlockPos pos, Block block, BlockPos fromPos, boolean notify)- Overrides:
neighborUpdatein classAbstractBlock
-
getStrongRedstonePower
public int getStrongRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction)- Overrides:
getStrongRedstonePowerin classAbstractBlock
-
getWeakRedstonePower
public int getWeakRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction)- Overrides:
getWeakRedstonePowerin classAbstractBlock
-
connectsTo
-
connectsTo
-
emitsRedstonePower
- Overrides:
emitsRedstonePowerin 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:
randomDisplayTickin classBlock
-
rotate
Applies a block rotation to a block state.By default, this returns the provided block state.
- Overrides:
rotatein classAbstractBlock- Returns:
- the rotated block state
-
mirror
- Overrides:
mirrorin classAbstractBlock
-
appendProperties
- Overrides:
appendPropertiesin 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:
onUsein 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)
-