Package net.minecraft.block
Class RedstoneWireBlock
- java.lang.Object
-
- net.minecraftforge.registries.ForgeRegistryEntry<Block>
-
- net.minecraft.block.AbstractBlock
-
- net.minecraft.block.Block
-
- net.minecraft.block.RedstoneWireBlock
-
- All Implemented Interfaces:
IItemProvider
,IForgeBlock
,IForgeRegistryEntry<Block>
public class RedstoneWireBlock extends Block
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.RenderSideCacheKey
-
Nested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.IExtendedPositionPredicate<A>, AbstractBlock.IPositionPredicate, AbstractBlock.OffsetType, AbstractBlock.Properties
-
Nested classes/interfaces inherited from class net.minecraftforge.registries.ForgeRegistryEntry
ForgeRegistryEntry.UncheckedRegistryEntry<V extends IForgeRegistryEntry<V>>
-
-
Field Summary
Fields Modifier and Type Field Description private static Vector3f[]
COLORS
private BlockState
crossState
static EnumProperty<RedstoneSide>
EAST
static EnumProperty<RedstoneSide>
NORTH
static IntegerProperty
POWER
static java.util.Map<Direction,EnumProperty<RedstoneSide>>
PROPERTY_BY_DIRECTION
private static VoxelShape
SHAPE_DOT
private java.util.Map<BlockState,VoxelShape>
SHAPES_CACHE
private static java.util.Map<Direction,VoxelShape>
SHAPES_FLOOR
private static java.util.Map<Direction,VoxelShape>
SHAPES_UP
private boolean
shouldSignal
static EnumProperty<RedstoneSide>
SOUTH
static EnumProperty<RedstoneSide>
WEST
-
Fields inherited from class net.minecraft.block.Block
BLOCK_STATE_REGISTRY, LOGGER, RANDOM, stateDefinition
-
Fields inherited from class net.minecraft.block.AbstractBlock
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
Constructors Constructor Description RedstoneWireBlock(AbstractBlock.Properties p_i48344_1_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
animateTick(BlockState p_180655_1_, World p_180655_2_, BlockPos p_180655_3_, java.util.Random p_180655_4_)
private VoxelShape
calculateShape(BlockState p_235554_1_)
private int
calculateTargetStrength(World p_235546_1_, BlockPos p_235546_2_)
protected static boolean
canConnectTo(BlockState p_176343_0_, IBlockReader world, BlockPos pos, Direction p_176343_1_)
boolean
canSurvive(BlockState p_196260_1_, IWorldReader p_196260_2_, BlockPos p_196260_3_)
private boolean
canSurviveOn(IBlockReader p_235552_1_, BlockPos p_235552_2_, BlockState p_235552_3_)
private void
checkCornerChangeAt(World p_176344_1_, BlockPos p_176344_2_)
protected void
createBlockStateDefinition(StateContainer.Builder<Block,BlockState> p_206840_1_)
static int
getColorForPower(int p_235550_0_)
private RedstoneSide
getConnectingSide(IBlockReader p_208074_1_, BlockPos p_208074_2_, Direction p_208074_3_)
private RedstoneSide
getConnectingSide(IBlockReader p_235545_1_, BlockPos p_235545_2_, Direction p_235545_3_, boolean p_235545_4_)
private BlockState
getConnectionState(IBlockReader p_235544_1_, BlockState p_235544_2_, BlockPos p_235544_3_)
int
getDirectSignal(BlockState p_176211_1_, IBlockReader p_176211_2_, BlockPos p_176211_3_, Direction p_176211_4_)
private BlockState
getMissingConnections(IBlockReader p_235551_1_, BlockState p_235551_2_, BlockPos p_235551_3_)
VoxelShape
getShape(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_, ISelectionContext p_220053_4_)
int
getSignal(BlockState p_180656_1_, IBlockReader p_180656_2_, BlockPos p_180656_3_, Direction p_180656_4_)
BlockState
getStateForPlacement(BlockItemUseContext p_196258_1_)
private int
getWireSignal(BlockState p_235557_1_)
private static boolean
isCross(BlockState p_235555_0_)
private static boolean
isDot(BlockState p_235556_0_)
boolean
isSignalSource(BlockState p_149744_1_)
BlockState
mirror(BlockState p_185471_1_, Mirror p_185471_2_)
void
neighborChanged(BlockState p_220069_1_, World p_220069_2_, BlockPos p_220069_3_, Block p_220069_4_, BlockPos p_220069_5_, boolean p_220069_6_)
void
onPlace(BlockState p_220082_1_, World p_220082_2_, BlockPos p_220082_3_, BlockState p_220082_4_, boolean p_220082_5_)
void
onRemove(BlockState p_196243_1_, World p_196243_2_, BlockPos p_196243_3_, BlockState p_196243_4_, boolean p_196243_5_)
BlockState
rotate(BlockState p_185499_1_, Rotation p_185499_2_)
private void
spawnParticlesAlongLine(World p_235549_1_, java.util.Random p_235549_2_, BlockPos p_235549_3_, Vector3f p_235549_4_, Direction p_235549_5_, Direction p_235549_6_, float p_235549_7_, float p_235549_8_)
void
updateIndirectNeighbourShapes(BlockState p_196248_1_, IWorld p_196248_2_, BlockPos p_196248_3_, int p_196248_4_, int p_196248_5_)
private void
updateNeighborsOfNeighboringWires(World p_235553_1_, BlockPos p_235553_2_)
private void
updatePowerStrength(World p_235547_1_, BlockPos p_235547_2_, BlockState p_235547_3_)
BlockState
updateShape(BlockState p_196271_1_, Direction p_196271_2_, BlockState p_196271_3_, IWorld p_196271_4_, BlockPos p_196271_5_, BlockPos p_196271_6_)
private void
updatesOnShapeChange(World p_235548_1_, BlockPos p_235548_2_, BlockState p_235548_3_, BlockState p_235548_4_)
ActionResultType
use(BlockState p_225533_1_, World p_225533_2_, BlockPos p_225533_3_, PlayerEntity p_225533_4_, Hand p_225533_5_, BlockRayTraceResult p_225533_6_)
-
Methods inherited from class net.minecraft.block.Block
appendHoverText, asBlock, asItem, box, byItem, canSupportCenter, canSupportRigidBlock, canSustainPlant, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, fallOn, fillItemCategory, getCloneItemStack, getDescriptionId, getDrops, getDrops, getExplosionResistance, getFriction, getHarvestLevel, getHarvestTool, getId, getJumpFactor, getName, getSoundType, getSpeedFactor, getStateDefinition, getTags, handleRain, hasDynamicShape, is, is, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isRandomlyTicking, isShapeFullBlock, playerDestroy, playerWillDestroy, popExperience, popResource, propagatesSkylightDown, pushEntitiesUp, registerDefaultState, setPlacedBy, shouldRenderFace, stateById, stepOn, toString, updateEntityAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded
-
Methods inherited from class net.minecraft.block.AbstractBlock
attack, canBeReplaced, canBeReplaced, defaultMaterialColor, entityInside, getAnalogOutputSignal, getBlockSupportShape, getCollisionShape, getDestroyProgress, getDrops, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMenuProvider, getOcclusionShape, getOffsetType, getPistonPushReaction, getRenderShape, getSeed, getShadeBrightness, getVisualShape, hasAnalogOutputSignal, isAir, isEntityBlock, 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
addDestroyEffects, addHitEffects, addLandingEffects, addRunningEffects, canBeReplacedByLeaves, canBeReplacedByLogs, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, catchFire, collisionExtendsVertically, createTileEntity, getAiPathNodeType, getBeaconColorMultiplier, getBedDirection, getBedSpawnPosition, getBlock, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFogColor, getLightValue, getPickBlock, getRespawnPosition, getSlipperiness, getSoundType, getStateAtViewpoint, getToolModifiedState, getWeakChanges, hasTileEntity, isAir, isBed, isBurning, isConduitFrame, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, isToolEffective, makesOpenTrapdoorAboveClimbable, observedNeighborChange, onBlockExploded, onNeighborChange, onPlantGrow, removedByPlayer, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay
-
-
-
-
Field Detail
-
NORTH
public static final EnumProperty<RedstoneSide> NORTH
-
EAST
public static final EnumProperty<RedstoneSide> EAST
-
SOUTH
public static final EnumProperty<RedstoneSide> SOUTH
-
WEST
public static final EnumProperty<RedstoneSide> WEST
-
POWER
public static final IntegerProperty POWER
-
PROPERTY_BY_DIRECTION
public static final java.util.Map<Direction,EnumProperty<RedstoneSide>> PROPERTY_BY_DIRECTION
-
SHAPE_DOT
private static final VoxelShape SHAPE_DOT
-
SHAPES_FLOOR
private static final java.util.Map<Direction,VoxelShape> SHAPES_FLOOR
-
SHAPES_UP
private static final java.util.Map<Direction,VoxelShape> SHAPES_UP
-
SHAPES_CACHE
private final java.util.Map<BlockState,VoxelShape> SHAPES_CACHE
-
COLORS
private static final Vector3f[] COLORS
-
crossState
private final BlockState crossState
-
shouldSignal
private boolean shouldSignal
-
-
Constructor Detail
-
RedstoneWireBlock
public RedstoneWireBlock(AbstractBlock.Properties p_i48344_1_)
-
-
Method Detail
-
calculateShape
private VoxelShape calculateShape(BlockState p_235554_1_)
-
getShape
public VoxelShape getShape(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_, ISelectionContext p_220053_4_)
- Overrides:
getShape
in classAbstractBlock
-
getStateForPlacement
public BlockState getStateForPlacement(BlockItemUseContext p_196258_1_)
- Overrides:
getStateForPlacement
in classBlock
-
getConnectionState
private BlockState getConnectionState(IBlockReader p_235544_1_, BlockState p_235544_2_, BlockPos p_235544_3_)
-
getMissingConnections
private BlockState getMissingConnections(IBlockReader p_235551_1_, BlockState p_235551_2_, BlockPos p_235551_3_)
-
updateShape
public BlockState updateShape(BlockState p_196271_1_, Direction p_196271_2_, BlockState p_196271_3_, IWorld p_196271_4_, BlockPos p_196271_5_, BlockPos p_196271_6_)
- Overrides:
updateShape
in classAbstractBlock
-
isCross
private static boolean isCross(BlockState p_235555_0_)
-
isDot
private static boolean isDot(BlockState p_235556_0_)
-
updateIndirectNeighbourShapes
public void updateIndirectNeighbourShapes(BlockState p_196248_1_, IWorld p_196248_2_, BlockPos p_196248_3_, int p_196248_4_, int p_196248_5_)
- Overrides:
updateIndirectNeighbourShapes
in classAbstractBlock
-
getConnectingSide
private RedstoneSide getConnectingSide(IBlockReader p_208074_1_, BlockPos p_208074_2_, Direction p_208074_3_)
-
getConnectingSide
private RedstoneSide getConnectingSide(IBlockReader p_235545_1_, BlockPos p_235545_2_, Direction p_235545_3_, boolean p_235545_4_)
-
canSurvive
public boolean canSurvive(BlockState p_196260_1_, IWorldReader p_196260_2_, BlockPos p_196260_3_)
- Overrides:
canSurvive
in classAbstractBlock
-
canSurviveOn
private boolean canSurviveOn(IBlockReader p_235552_1_, BlockPos p_235552_2_, BlockState p_235552_3_)
-
updatePowerStrength
private void updatePowerStrength(World p_235547_1_, BlockPos p_235547_2_, BlockState p_235547_3_)
-
calculateTargetStrength
private int calculateTargetStrength(World p_235546_1_, BlockPos p_235546_2_)
-
getWireSignal
private int getWireSignal(BlockState p_235557_1_)
-
onPlace
public void onPlace(BlockState p_220082_1_, World p_220082_2_, BlockPos p_220082_3_, BlockState p_220082_4_, boolean p_220082_5_)
- Overrides:
onPlace
in classAbstractBlock
-
onRemove
public void onRemove(BlockState p_196243_1_, World p_196243_2_, BlockPos p_196243_3_, BlockState p_196243_4_, boolean p_196243_5_)
- Overrides:
onRemove
in classAbstractBlock
-
updateNeighborsOfNeighboringWires
private void updateNeighborsOfNeighboringWires(World p_235553_1_, BlockPos p_235553_2_)
-
neighborChanged
public void neighborChanged(BlockState p_220069_1_, World p_220069_2_, BlockPos p_220069_3_, Block p_220069_4_, BlockPos p_220069_5_, boolean p_220069_6_)
- Overrides:
neighborChanged
in classAbstractBlock
-
getDirectSignal
public int getDirectSignal(BlockState p_176211_1_, IBlockReader p_176211_2_, BlockPos p_176211_3_, Direction p_176211_4_)
- Overrides:
getDirectSignal
in classAbstractBlock
-
getSignal
public int getSignal(BlockState p_180656_1_, IBlockReader p_180656_2_, BlockPos p_180656_3_, Direction p_180656_4_)
- Overrides:
getSignal
in classAbstractBlock
-
canConnectTo
protected static boolean canConnectTo(BlockState p_176343_0_, IBlockReader world, BlockPos pos, @Nullable Direction p_176343_1_)
-
isSignalSource
public boolean isSignalSource(BlockState p_149744_1_)
- Overrides:
isSignalSource
in classAbstractBlock
-
getColorForPower
public static int getColorForPower(int p_235550_0_)
-
spawnParticlesAlongLine
private void spawnParticlesAlongLine(World p_235549_1_, java.util.Random p_235549_2_, BlockPos p_235549_3_, Vector3f p_235549_4_, Direction p_235549_5_, Direction p_235549_6_, float p_235549_7_, float p_235549_8_)
-
animateTick
public void animateTick(BlockState p_180655_1_, World p_180655_2_, BlockPos p_180655_3_, java.util.Random p_180655_4_)
- Overrides:
animateTick
in classBlock
-
rotate
public BlockState rotate(BlockState p_185499_1_, Rotation p_185499_2_)
- Overrides:
rotate
in classAbstractBlock
-
mirror
public BlockState mirror(BlockState p_185471_1_, Mirror p_185471_2_)
- Overrides:
mirror
in classAbstractBlock
-
createBlockStateDefinition
protected void createBlockStateDefinition(StateContainer.Builder<Block,BlockState> p_206840_1_)
- Overrides:
createBlockStateDefinition
in classBlock
-
use
public ActionResultType use(BlockState p_225533_1_, World p_225533_2_, BlockPos p_225533_3_, PlayerEntity p_225533_4_, Hand p_225533_5_, BlockRayTraceResult p_225533_6_)
- Overrides:
use
in classAbstractBlock
-
updatesOnShapeChange
private void updatesOnShapeChange(World p_235548_1_, BlockPos p_235548_2_, BlockState p_235548_3_, BlockState p_235548_4_)
-
-