Package net.minecraft.world.level.block
Class RedStoneWireBlock
java.lang.Object
net.minecraftforge.registries.ForgeRegistryEntry<Block>
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
net.minecraft.world.level.block.RedStoneWireBlock
- All Implemented Interfaces:
ItemLike
,IForgeBlock
,IForgeRegistryEntry<Block>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.Block
Block.BlockStatePairKey
Nested classes/interfaces inherited from class net.minecraft.world.level.block.state.BlockBehaviour
BlockBehaviour.BlockStateBase, BlockBehaviour.OffsetType, BlockBehaviour.Properties, BlockBehaviour.StateArgumentPredicate<A>, BlockBehaviour.StatePredicate
Nested classes/interfaces inherited from class net.minecraftforge.registries.ForgeRegistryEntry
ForgeRegistryEntry.UncheckedRegistryEntry<V extends IForgeRegistryEntry<V>>
-
Field Summary
Modifier and TypeFieldDescriptionprivate static Vec3[]
private BlockState
protected static int
static EnumProperty<RedstoneSide>
protected static int
protected static int
static EnumProperty<RedstoneSide>
private static float
static IntegerProperty
static Map<Direction,EnumProperty<RedstoneSide>>
protected static int
private static VoxelShape
private static Map<BlockState,VoxelShape>
private static Map<Direction,VoxelShape>
private static Map<Direction,VoxelShape>
private boolean
static EnumProperty<RedstoneSide>
protected static int
static EnumProperty<RedstoneSide>
Fields inherited from class net.minecraft.world.level.block.Block
BLOCK_STATE_REGISTRY, INDESTRUCTIBLE, INSTANT, LOGGER, RANDOM, 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_SUPPRESS_DROPS, UPDATE_SUPPRESS_LIGHT
Fields inherited from class net.minecraft.world.level.block.state.BlockBehaviour
drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, material, properties, soundType, speedFactor, UPDATE_SHAPE_ORDER
Fields inherited from class net.minecraftforge.registries.ForgeRegistryEntry
delegate
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
animateTick(BlockState p_55574_, Level p_55575_, BlockPos p_55576_, Random p_55577_)
private VoxelShape
calculateShape(BlockState p_55643_)
private int
calculateTargetStrength(Level p_55528_, BlockPos p_55529_)
boolean
canSurvive(BlockState p_55585_, LevelReader p_55586_, BlockPos p_55587_)
private boolean
canSurviveOn(BlockGetter p_55613_, BlockPos p_55614_, BlockState p_55615_)
private void
checkCornerChangeAt(Level p_55617_, BlockPos p_55618_)
protected void
createBlockStateDefinition(StateDefinition.Builder<Block,BlockState> p_55605_)
static int
getColorForPower(int p_55607_)
private RedstoneSide
getConnectingSide(BlockGetter p_55519_, BlockPos p_55520_, Direction p_55521_)
private RedstoneSide
getConnectingSide(BlockGetter p_55523_, BlockPos p_55524_, Direction p_55525_, boolean p_55526_)
private BlockState
getConnectionState(BlockGetter p_55515_, BlockState p_55516_, BlockPos p_55517_)
int
getDirectSignal(BlockState p_55625_, BlockGetter p_55626_, BlockPos p_55627_, Direction p_55628_)
private BlockState
getMissingConnections(BlockGetter p_55609_, BlockState p_55610_, BlockPos p_55611_)
getShape(BlockState p_55620_, BlockGetter p_55621_, BlockPos p_55622_, CollisionContext p_55623_)
int
getSignal(BlockState p_55549_, BlockGetter p_55550_, BlockPos p_55551_, Direction p_55552_)
getStateForPlacement(BlockPlaceContext p_55513_)
private int
getWireSignal(BlockState p_55649_)
private static boolean
isCross(BlockState p_55645_)
private static boolean
isDot(BlockState p_55647_)
boolean
isSignalSource(BlockState p_55636_)
mirror(BlockState p_55589_, Mirror p_55590_)
void
neighborChanged(BlockState p_55561_, Level p_55562_, BlockPos p_55563_, Block p_55564_, BlockPos p_55565_, boolean p_55566_)
void
onPlace(BlockState p_55630_, Level p_55631_, BlockPos p_55632_, BlockState p_55633_, boolean p_55634_)
void
onRemove(BlockState p_55568_, Level p_55569_, BlockPos p_55570_, BlockState p_55571_, boolean p_55572_)
rotate(BlockState p_55592_, Rotation p_55593_)
protected static boolean
shouldConnectTo(BlockState p_55641_)
protected static boolean
shouldConnectTo(BlockState p_55595_, Direction p_55596_)
private void
spawnParticlesAlongLine(Level p_154310_, Random p_154311_, BlockPos p_154312_, Vec3 p_154313_, Direction p_154314_, Direction p_154315_, float p_154316_, float p_154317_)
void
updateIndirectNeighbourShapes(BlockState p_55579_, LevelAccessor p_55580_, BlockPos p_55581_, int p_55582_, int p_55583_)
private void
updateNeighborsOfNeighboringWires(Level p_55638_, BlockPos p_55639_)
private void
updatePowerStrength(Level p_55531_, BlockPos p_55532_, BlockState p_55533_)
updateShape(BlockState p_55598_, Direction p_55599_, BlockState p_55600_, LevelAccessor p_55601_, BlockPos p_55602_, BlockPos p_55603_)
private void
updatesOnShapeChange(Level p_55535_, BlockPos p_55536_, BlockState p_55537_, BlockState p_55538_)
use(BlockState p_55554_, Level p_55555_, BlockPos p_55556_, Player p_55557_, InteractionHand p_55558_, BlockHitResult p_55559_)
Methods inherited from class net.minecraft.world.level.block.Block
appendHoverText, asBlock, asItem, box, byItem, canSupportCenter, canSupportRigidBlock, canSustainPlant, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, dropResources, fallOn, fillItemCategory, getCloneItemStack, getDescriptionId, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getRenderPropertiesInternal, getShapeForEachState, getSoundType, getSpeedFactor, getStateDefinition, getTags, handlePrecipitation, hasDynamicShape, initializeClient, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isRandomlyTicking, isShapeFullBlock, playerDestroy, playerWillDestroy, popExperience, popResource, popResourceFromFace, propagatesSkylightDown, pushEntitiesUp, registerDefaultState, setPlacedBy, shouldRenderFace, spawnDestroyParticles, stateById, stepOn, toString, updateEntityAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOf
Methods inherited from class net.minecraft.world.level.block.state.BlockBehaviour
attack, canBeReplaced, canBeReplaced, defaultDestroyTime, defaultMaterialColor, entityInside, getAnalogOutputSignal, getBlockSupportShape, getCollisionShape, getDestroyProgress, getDrops, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getOffsetType, getPistonPushReaction, getRenderShape, getSeed, getShadeBrightness, getVisualShape, hasAnalogOutputSignal, isAir, isCollisionShapeFullBlock, isPathfindable, onProjectileHit, randomTick, skipRendering, spawnAfterBreak, tick, triggerEvent, useShapeForLightOcclusion
Methods inherited from class net.minecraftforge.registries.ForgeRegistryEntry
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraftforge.common.extensions.IForgeBlock
addLandingEffects, addRunningEffects, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, catchFire, collisionExtendsVertically, getAiPathNodeType, getBeaconColorMultiplier, getBedDirection, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFriction, getLightEmission, getPickBlock, getRespawnPosition, getSoundType, getStateAtViewpoint, getToolModifiedState, getWeakChanges, isBed, isBurning, isConduitFrame, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, makesOpenTrapdoorAboveClimbable, onBlockExploded, onNeighborChange, removedByPlayer, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay
-
Field Details
-
NORTH
-
EAST
-
SOUTH
-
WEST
-
POWER
-
PROPERTY_BY_DIRECTION
-
H
protected static final int H- See Also:
- Constant Field Values
-
W
protected static final int W- See Also:
- Constant Field Values
-
E
protected static final int E- See Also:
- Constant Field Values
-
N
protected static final int N- See Also:
- Constant Field Values
-
S
protected static final int S- See Also:
- Constant Field Values
-
SHAPE_DOT
-
SHAPES_FLOOR
-
SHAPES_UP
-
SHAPES_CACHE
-
COLORS
-
PARTICLE_DENSITY
private static final float PARTICLE_DENSITY- See Also:
- Constant Field Values
-
crossState
-
shouldSignal
private boolean shouldSignal
-
-
Constructor Details
-
RedStoneWireBlock
-
-
Method Details
-
calculateShape
-
getShape
public VoxelShape getShape(BlockState p_55620_, BlockGetter p_55621_, BlockPos p_55622_, CollisionContext p_55623_)- Overrides:
getShape
in classBlockBehaviour
-
getStateForPlacement
- Overrides:
getStateForPlacement
in classBlock
-
getConnectionState
private BlockState getConnectionState(BlockGetter p_55515_, BlockState p_55516_, BlockPos p_55517_) -
getMissingConnections
private BlockState getMissingConnections(BlockGetter p_55609_, BlockState p_55610_, BlockPos p_55611_) -
updateShape
public BlockState updateShape(BlockState p_55598_, Direction p_55599_, BlockState p_55600_, LevelAccessor p_55601_, BlockPos p_55602_, BlockPos p_55603_)- Overrides:
updateShape
in classBlockBehaviour
-
isCross
-
isDot
-
updateIndirectNeighbourShapes
public void updateIndirectNeighbourShapes(BlockState p_55579_, LevelAccessor p_55580_, BlockPos p_55581_, int p_55582_, int p_55583_)- Overrides:
updateIndirectNeighbourShapes
in classBlockBehaviour
-
getConnectingSide
private RedstoneSide getConnectingSide(BlockGetter p_55519_, BlockPos p_55520_, Direction p_55521_) -
getConnectingSide
private RedstoneSide getConnectingSide(BlockGetter p_55523_, BlockPos p_55524_, Direction p_55525_, boolean p_55526_) -
canSurvive
- Overrides:
canSurvive
in classBlockBehaviour
-
canSurviveOn
-
updatePowerStrength
-
calculateTargetStrength
-
getWireSignal
-
checkCornerChangeAt
-
onPlace
public void onPlace(BlockState p_55630_, Level p_55631_, BlockPos p_55632_, BlockState p_55633_, boolean p_55634_)- Overrides:
onPlace
in classBlockBehaviour
-
onRemove
public void onRemove(BlockState p_55568_, Level p_55569_, BlockPos p_55570_, BlockState p_55571_, boolean p_55572_)- Overrides:
onRemove
in classBlockBehaviour
-
updateNeighborsOfNeighboringWires
-
neighborChanged
public void neighborChanged(BlockState p_55561_, Level p_55562_, BlockPos p_55563_, Block p_55564_, BlockPos p_55565_, boolean p_55566_)- Overrides:
neighborChanged
in classBlockBehaviour
-
getDirectSignal
public int getDirectSignal(BlockState p_55625_, BlockGetter p_55626_, BlockPos p_55627_, Direction p_55628_)- Overrides:
getDirectSignal
in classBlockBehaviour
-
getSignal
public int getSignal(BlockState p_55549_, BlockGetter p_55550_, BlockPos p_55551_, Direction p_55552_)- Overrides:
getSignal
in classBlockBehaviour
-
shouldConnectTo
-
shouldConnectTo
-
isSignalSource
- Overrides:
isSignalSource
in classBlockBehaviour
-
getColorForPower
public static int getColorForPower(int p_55607_) -
spawnParticlesAlongLine
-
animateTick
- Overrides:
animateTick
in classBlock
-
rotate
- Overrides:
rotate
in classBlockBehaviour
-
mirror
- Overrides:
mirror
in classBlockBehaviour
-
createBlockStateDefinition
- Overrides:
createBlockStateDefinition
in classBlock
-
use
public InteractionResult use(BlockState p_55554_, Level p_55555_, BlockPos p_55556_, Player p_55557_, InteractionHand p_55558_, BlockHitResult p_55559_)- Overrides:
use
in classBlockBehaviour
-
updatesOnShapeChange
private void updatesOnShapeChange(Level p_55535_, BlockPos p_55536_, BlockState p_55537_, BlockState p_55538_)
-