Package net.minecraft.world.level.block
Class RedstoneWallTorchBlock
java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
net.minecraft.world.level.block.BaseTorchBlock
net.minecraft.world.level.block.RedstoneTorchBlock
net.minecraft.world.level.block.RedstoneWallTorchBlock
- All Implemented Interfaces:
FeatureElement
,ItemLike
,IBlockExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.RedstoneTorchBlock
RedstoneTorchBlock.Toggle
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.OffsetFunction, BlockBehaviour.OffsetType, BlockBehaviour.Properties, BlockBehaviour.StateArgumentPredicate<A>, BlockBehaviour.StatePredicate
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec
<RedstoneWallTorchBlock> static final DirectionProperty
static final BooleanProperty
Fields inherited from class net.minecraft.world.level.block.RedstoneTorchBlock
MAX_RECENT_TOGGLES, RECENT_TOGGLE_TIMER, RESTART_DELAY
Fields inherited from class net.minecraft.world.level.block.BaseTorchBlock
AABB, AABB_STANDING_OFFSET
Fields inherited from class net.minecraft.world.level.block.Block
BLOCK_STATE_REGISTRY, INDESTRUCTIBLE, INSTANT, 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
Fields inherited from class net.minecraft.world.level.block.state.BlockBehaviour
drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, properties, requiredFeatures, soundType, speedFactor, UPDATE_SHAPE_ORDER
Fields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
animateTick
(BlockState state, Level level, BlockPos pos, RandomSource random) Called periodically clientside on blocks near the player to show effects (like furnace fire particles).protected boolean
canSurvive
(BlockState state, LevelReader level, BlockPos pos) com.mojang.serialization.MapCodec
<RedstoneWallTorchBlock> codec()
protected void
protected VoxelShape
getShape
(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) protected int
getSignal
(BlockState blockState, BlockGetter blockAccess, BlockPos pos, Direction side) Returns the signal this block emits in the given direction.getStateForPlacement
(BlockPlaceContext context) protected boolean
hasNeighborSignal
(Level level, BlockPos pos, BlockState state) protected BlockState
mirror
(BlockState state, Mirror mirror) Returns the blockstate with the given mirror of the passed blockstate.protected BlockState
rotate
(BlockState state, Rotation rotation) Returns the blockstate with the given rotation from the passed blockstate.protected BlockState
updateShape
(BlockState state, Direction facing, BlockState facingState, LevelAccessor level, BlockPos currentPos, BlockPos facingPos) Update the provided state given the provided neighbor direction and neighbor state, returning a new state.Methods inherited from class net.minecraft.world.level.block.RedstoneTorchBlock
getDirectSignal, isSignalSource, neighborChanged, onPlace, onRemove, tick
Methods inherited from class net.minecraft.world.level.block.Block
appendHoverText, asBlock, asItem, box, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, fallOn, getCloneItemStack, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getShapeForEachState, getSpeedFactor, getStateDefinition, handlePrecipitation, hasDynamicShape, initializeClient, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isShapeFullBlock, playerDestroy, playerWillDestroy, popExperience, popResource, popResourceFromFace, pushEntitiesUp, registerDefaultState, setPlacedBy, shouldRenderFace, spawnDestroyParticles, stateById, stepOn, toString, tryDropExperience, updateEntityAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOf
Methods inherited from class net.minecraft.world.level.block.state.BlockBehaviour
attack, canBeReplaced, canBeReplaced, defaultDestroyTime, defaultMapColor, entityInside, getAnalogOutputSignal, getBlockSupportShape, getCollisionShape, getDestroyProgress, getDrops, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getRenderShape, getSeed, getShadeBrightness, getSoundType, getVisualShape, hasAnalogOutputSignal, isAir, isCollisionShapeFullBlock, isOcclusionShapeFullBlock, isPathfindable, isRandomlyTicking, onExplosionHit, onProjectileHit, propagatesSkylightDown, properties, propertiesCodec, randomTick, requiredFeatures, simpleCodec, skipRendering, spawnAfterBreak, triggerEvent, updateIndirectNeighbourShapes, useItemOn, useShapeForLightOcclusion, useWithoutItem
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabled
Methods inherited from interface net.neoforged.neoforge.common.extensions.IBlockExtension
addLandingEffects, addRunningEffects, canBeHydrated, canConnectRedstone, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, canSustainPlant, collisionExtendsVertically, getAdjacentBlockPathType, getAppearance, getBeaconColorMultiplier, getBedDirection, getBlockPathType, getBubbleColumnDirection, getCloneItemStack, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFriction, getLightEmission, getMapColor, getPistonPushReaction, getRespawnPosition, getSoundType, getStateAtViewpoint, getToolModifiedState, getWeakChanges, hasDynamicLightEmission, hidesNeighborFace, isBed, isBurning, isConduitFrame, isEmpty, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, makesOpenTrapdoorAboveClimbable, onBlockExploded, onBlockStateChange, onCaughtFire, onDestroyedByPlayer, onDestroyedByPushReaction, onNeighborChange, onTreeGrow, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay, shouldHideAdjacentFluidFace, supportsExternalFaceHiding
-
Field Details
-
CODEC
-
FACING
-
LIT
-
-
Constructor Details
-
RedstoneWallTorchBlock
-
-
Method Details
-
codec
- Overrides:
codec
in classRedstoneTorchBlock
-
getDescriptionId
- Overrides:
getDescriptionId
in classBlock
-
getShape
protected VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) - Overrides:
getShape
in classBaseTorchBlock
-
canSurvive
- Overrides:
canSurvive
in classBaseTorchBlock
-
updateShape
protected BlockState updateShape(BlockState state, Direction facing, BlockState facingState, LevelAccessor level, BlockPos currentPos, BlockPos facingPos) Update the provided state given the provided neighbor direction and neighbor state, returning a new state. For example, fences make their connections to the passed in state if possible, and wet concrete powder immediately returns its solidified counterpart. Note that this method should ideally consider only the specific direction passed in.- Overrides:
updateShape
in classBaseTorchBlock
-
getStateForPlacement
- Overrides:
getStateForPlacement
in classBlock
-
animateTick
Called periodically clientside on blocks near the player to show effects (like furnace fire particles).- Overrides:
animateTick
in classRedstoneTorchBlock
-
hasNeighborSignal
- Overrides:
hasNeighborSignal
in classRedstoneTorchBlock
-
getSignal
protected int getSignal(BlockState blockState, BlockGetter blockAccess, BlockPos pos, Direction side) Returns the signal this block emits in the given direction.NOTE: directions in redstone signal related methods are backwards, so this method checks for the signal emitted in the opposite direction of the one given.
- Overrides:
getSignal
in classRedstoneTorchBlock
-
rotate
Returns the blockstate with the given rotation from the passed blockstate. If inapplicable, returns the passed blockstate.- Overrides:
rotate
in classBlockBehaviour
-
mirror
Returns the blockstate with the given mirror of the passed blockstate. If inapplicable, returns the passed blockstate.- Overrides:
mirror
in classBlockBehaviour
-
createBlockStateDefinition
- Overrides:
createBlockStateDefinition
in classRedstoneTorchBlock
-