Class RedstoneTorchBlock
- All Implemented Interfaces:
- ItemConvertible,- ToggleableFeature
- Direct Known Subclasses:
- WallRedstoneTorchBlock
- Mappings:
- Namespace - Name - named - net/minecraft/block/RedstoneTorchBlock- intermediary - net/minecraft/class_2459- official - dpw
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from class net.minecraft.block.AbstractBlockAbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.Offsetter, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate static final Map<BlockView, List<RedstoneTorchBlock.BurnoutEntry>> static final com.mojang.serialization.MapCodec<RedstoneTorchBlock> static final intstatic final intstatic final intstatic final BooleanPropertyprivate static final intFields inherited from class net.minecraft.block.AbstractTorchBlockfield_46270, SHAPEFields inherited from class net.minecraft.block.Blockfield_31023, field_31024, field_31025, field_31035, FORCE_STATE, MOVED, NO_REDRAW, NOTIFY_ALL, NOTIFY_ALL_AND_REDRAW, NOTIFY_LISTENERS, NOTIFY_NEIGHBORS, REDRAW_ON_MAIN_THREAD, SKIP_DROPS, SKIP_REDSTONE_WIRE_STATE_REPLACEMENT, STATE_IDS, stateManagerFields inherited from class net.minecraft.block.AbstractBlockcollidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableKey, randomTicks, requiredFeatures, resistance, settings, slipperiness, soundGroup, translationKey, velocityMultiplierFields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeatureFEATURE_ENABLED_REGISTRY_KEYS
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidappendProperties(StateManager.Builder<Block, BlockState> builder) Appends block state properties to this block.protected booleanemitsRedstonePower(BlockState state) Returns whether the block is capable of emitting redstone power.com.mojang.serialization.MapCodec<? extends RedstoneTorchBlock> getCodec()protected @Nullable WireOrientationgetEmissionOrientation(World world, BlockState state) protected intgetStrongRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction) Returns the strong redstone power emitted from the block.protected intgetWeakRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction) Returns the weak redstone power emitted from the block.private static booleanisBurnedOut(World world, BlockPos pos, boolean addNew) protected voidneighborUpdate(BlockState state, World world, BlockPos pos, Block sourceBlock, @Nullable WireOrientation wireOrientation, boolean notify) Called when a neighboring block is updated.protected voidonBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify) Called server-side on the new block when the block state is changed.protected voidonStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) Called server-side on the old block when the block state is changed.voidrandomDisplayTick(BlockState state, World world, BlockPos pos, Random random) Called randomly on the client.protected voidscheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random) Called server-side when a block receives a scheduled tick.protected booleanshouldUnpower(World world, BlockPos pos, BlockState state) private voidupdate(World world, BlockPos pos, BlockState state) Methods inherited from class net.minecraft.block.AbstractTorchBlockcanPlaceAt, getOutlineShape, getStateForNeighborUpdateMethods inherited from class net.minecraft.block.BlockafterBreak, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropExperienceWhenMined, dropStack, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPlacementState, getRawIdFromState, getRegistryEntry, getShapesForStates, getSlipperiness, getStateFromRawId, getStateManager, getStateWithProperties, getVelocityMultiplier, hasDynamicBounds, hasTopRim, isFaceFullSquare, isShapeFullCube, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, spawnBreakParticles, toStringMethods inherited from class net.minecraft.block.AbstractBlockcalcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canReplace, createCodec, createScreenHandlerFactory, createSettingsCodec, getAmbientOcclusionLightLevel, getCameraCollisionShape, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getFluidState, getHardness, getInsideCollisionShape, getLootTableKey, getMaxHorizontalModelOffset, getOpacity, getPickStack, getRaycastShape, getRenderingSeed, getRenderType, getRequiredFeatures, getSettings, getSidesShape, getSoundGroup, getTranslationKey, getVerticalModelOffsetMultiplier, hasComparatorOutput, hasRandomTicks, hasSidedTransparency, isShapeFullCube, isSideInvisible, isTransparent, mirror, onBlockBreakStart, onEntityCollision, onExploded, onProjectileHit, onStacksDropped, onSyncedBlockEvent, onUse, onUseWithItem, prepare, randomTick, rotateMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeatureisEnabled
- 
Field Details- 
CODEC- Mappings:
- Namespace - Name - Mixin selector - named - CODEC- Lnet/minecraft/block/RedstoneTorchBlock;CODEC:Lcom/mojang/serialization/MapCodec;- intermediary - field_46424- Lnet/minecraft/class_2459;field_46424:Lcom/mojang/serialization/MapCodec;- official - c- Ldpw;c:Lcom/mojang/serialization/MapCodec;
 
- 
LIT- Mappings:
- Namespace - Name - Mixin selector - named - LIT- Lnet/minecraft/block/RedstoneTorchBlock;LIT:Lnet/minecraft/state/property/BooleanProperty;- intermediary - field_11446- Lnet/minecraft/class_2459;field_11446:Lnet/minecraft/class_2746;- official - d- Ldpw;d:Ldxp;
 
- 
BURNOUT_MAP- Mappings:
- Namespace - Name - Mixin selector - named - BURNOUT_MAP- Lnet/minecraft/block/RedstoneTorchBlock;BURNOUT_MAP:Ljava/util/Map;- intermediary - field_11445- Lnet/minecraft/class_2459;field_11445:Ljava/util/Map;- official - h- Ldpw;h:Ljava/util/Map;
 
- 
field_31227public static final int field_31227- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - field_31227- Lnet/minecraft/block/RedstoneTorchBlock;field_31227:I- intermediary - field_31227- Lnet/minecraft/class_2459;field_31227:I- official - e- Ldpw;e:I
 
- 
field_31228public static final int field_31228- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - field_31228- Lnet/minecraft/block/RedstoneTorchBlock;field_31228:I- intermediary - field_31228- Lnet/minecraft/class_2459;field_31228:I- official - f- Ldpw;f:I
 
- 
field_31229public static final int field_31229- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - field_31229- Lnet/minecraft/block/RedstoneTorchBlock;field_31229:I- intermediary - field_31229- Lnet/minecraft/class_2459;field_31229:I- official - g- Ldpw;g:I
 
- 
SCHEDULED_TICK_DELAYprivate static final int SCHEDULED_TICK_DELAY- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - SCHEDULED_TICK_DELAY- Lnet/minecraft/block/RedstoneTorchBlock;SCHEDULED_TICK_DELAY:I- intermediary - field_31230- Lnet/minecraft/class_2459;field_31230:I- official - i- Ldpw;i:I
 
 
- 
- 
Constructor Details- 
RedstoneTorchBlock- Mappings:
- Namespace - Name - Mixin selector - named - <init>- Lnet/minecraft/block/AbstractBlock;<init>(Lnet/minecraft/block/AbstractBlock$Settings;)V- intermediary - <init>- Lnet/minecraft/class_4970;<init>(Lnet/minecraft/class_4970$class_2251;)V- official - <init>- Ldwx;<init>(Ldwx$d;)V
 
 
- 
- 
Method Details- 
getCodec- Specified by:
- getCodecin class- AbstractTorchBlock
- Mappings:
- Namespace - Name - Mixin selector - named - getCodec- Lnet/minecraft/block/AbstractBlock;getCodec()Lcom/mojang/serialization/MapCodec;- intermediary - method_53969- Lnet/minecraft/class_4970;method_53969()Lcom/mojang/serialization/MapCodec;- official - a- Ldwx;a()Lcom/mojang/serialization/MapCodec;
 
- 
onBlockAddedprotected void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify) Called server-side on the new block when the block state is changed. This includes block placement. When overriding this method,AbstractTorchBlock.getStateForNeighborUpdate(net.minecraft.block.BlockState, net.minecraft.world.WorldView, net.minecraft.world.tick.ScheduledTickView, net.minecraft.util.math.BlockPos, net.minecraft.util.math.Direction, net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState, net.minecraft.util.math.random.Random)orneighborUpdate(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, net.minecraft.block.Block, net.minecraft.world.block.WireOrientation, boolean)should also be overridden. The method is used in the following cases:- When activating a redstone component on placement (used along with neighborUpdate(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, net.minecraft.block.Block, net.minecraft.world.block.WireOrientation, boolean)
- When resetting a position-dependent state (see TargetBlock)
- When converting a block on placement (see WetSpongeBlock)
- When fire lights a portal
 - Overrides:
- onBlockAddedin class- AbstractBlock
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - onBlockAdded- Lnet/minecraft/block/AbstractBlock;onBlockAdded(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Z)V- intermediary - method_9615- Lnet/minecraft/class_4970;method_9615(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Z)V- official - b- Ldwx;b(Ldwy;Ldgj;Lji;Ldwy;Z)V
 
- When activating a redstone component on placement (used along with 
- 
update- Mappings:
- Namespace - Name - Mixin selector - named - update- Lnet/minecraft/block/RedstoneTorchBlock;update(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V- intermediary - method_61749- Lnet/minecraft/class_2459;method_61749(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V- official - b- Ldpw;b(Ldgj;Lji;Ldwy;)V
 
- 
onStateReplacedprotected void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) Called server-side on the old block when the block state is changed. This includes block removal. This is used to update neighboring blocks when an active redstone power source is removed, or to drop the contents of an inventory. The checkstate.isOf(newState.getBlock())can be used to see if the block was removed or not.For most block entities, ItemScatterer.onStateReplaced(net.minecraft.block.BlockState, net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos)provides a good implementation of this method. Make sure to callsuper.onStateReplaced(state, world, pos, newState, moved);after invokingItemScatterermethods.- Overrides:
- onStateReplacedin class- AbstractBlock
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - onStateReplaced- Lnet/minecraft/block/AbstractBlock;onStateReplaced(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Z)V- intermediary - method_9536- Lnet/minecraft/class_4970;method_9536(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Z)V- official - a- Ldwx;a(Ldwy;Ldgj;Lji;Ldwy;Z)V
 
- 
getWeakRedstonePowerprotected int getWeakRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction) Returns the weak redstone power emitted from the block.When overriding this, make sure to also override emitsRedstonePower(net.minecraft.block.BlockState)to returntrue.Weak redstone power is a power that cannot power a redstone wire when a solid block is in between. For example, RedstoneBlockandTargetBlockemits weak redstone power only.LeverBlockandButtonBlockemits both weak and strong redstone power depending on the direction.- Overrides:
- getWeakRedstonePowerin class- AbstractBlock
- Returns:
- the weak redstone power emitted from the block
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - getWeakRedstonePower- Lnet/minecraft/block/AbstractBlock;getWeakRedstonePower(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;)I- intermediary - method_9524- Lnet/minecraft/class_4970;method_9524(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;)I- official - a- Ldwx;a(Ldwy;Ldfo;Lji;Ljn;)I
 
- 
shouldUnpower- Mappings:
- Namespace - Name - Mixin selector - named - shouldUnpower- Lnet/minecraft/block/RedstoneTorchBlock;shouldUnpower(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Z- intermediary - method_10488- Lnet/minecraft/class_2459;method_10488(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Z- official - a- Ldpw;a(Ldgj;Lji;Ldwy;)Z
 
- 
scheduledTickCalled server-side when a block receives a scheduled tick. This can be used like a timer. Scheduled ticks are added usingScheduledTickView.scheduleBlockTick(BlockPos, Block, int).Scheduled ticks are often used inside AbstractTorchBlock.getStateForNeighborUpdate(net.minecraft.block.BlockState, net.minecraft.world.WorldView, net.minecraft.world.tick.ScheduledTickView, net.minecraft.util.math.BlockPos, net.minecraft.util.math.Direction, net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState, net.minecraft.util.math.random.Random).Here are some examples: - SugarCaneBlockchecks the placement requirement.
- DispenserBlockdispenses its content.
- CommandBlockexecutes its command.
- FrogspawnBlockspawns a tadpole.
- SoulSandBlockupdates a bubble column.
- FallingBlocktries to fall.
 - Overrides:
- scheduledTickin class- AbstractBlock
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - scheduledTick- Lnet/minecraft/block/AbstractBlock;scheduledTick(Lnet/minecraft/block/BlockState;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/random/Random;)V- intermediary - method_9588- Lnet/minecraft/class_4970;method_9588(Lnet/minecraft/class_2680;Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Lnet/minecraft/class_5819;)V- official - a- Ldwx;a(Ldwy;Lard;Lji;Lazh;)V
 
- 
neighborUpdateprotected void neighborUpdate(BlockState state, World world, BlockPos pos, Block sourceBlock, @Nullable @Nullable WireOrientation wireOrientation, boolean notify) Called when a neighboring block is updated. This method should be overridden to perform an action with a side effect, most notably an activation of a redstone component. This can also be used to perform an action changing block states of other blocks, such asSpongeBlockwhich absorbs water.To replace the state of the block itself, override AbstractTorchBlock.getStateForNeighborUpdate(net.minecraft.block.BlockState, net.minecraft.world.WorldView, net.minecraft.world.tick.ScheduledTickView, net.minecraft.util.math.BlockPos, net.minecraft.util.math.Direction, net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState, net.minecraft.util.math.random.Random)instead.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.- Overrides:
- neighborUpdatein class- AbstractBlock
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - neighborUpdate- Lnet/minecraft/block/AbstractBlock;neighborUpdate(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/Block;Lnet/minecraft/world/block/WireOrientation;Z)V- intermediary - method_9612- Lnet/minecraft/class_4970;method_9612(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2248;Lnet/minecraft/class_9904;Z)V- official - a- Ldwx;a(Ldwy;Ldgj;Lji;Ldjn;Leui;Z)V
 
- 
getStrongRedstonePowerprotected int getStrongRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction) Returns the strong redstone power emitted from the block.When overriding this, make sure to also override emitsRedstonePower(net.minecraft.block.BlockState)to returntrue.getWeakRedstonePower(net.minecraft.block.BlockState, net.minecraft.world.BlockView, net.minecraft.util.math.BlockPos, net.minecraft.util.math.Direction)might also need to be overridden.Strong redstone power is a power that can power a redstone wire when a solid block is in between. For example, RedstoneBlockandTargetBlockemits weak redstone power only.LeverBlockandButtonBlockemits both weak and strong redstone power.- Overrides:
- getStrongRedstonePowerin class- AbstractBlock
- Returns:
- the strong redstone power emitted from the block
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - getStrongRedstonePower- Lnet/minecraft/block/AbstractBlock;getStrongRedstonePower(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;)I- intermediary - method_9603- Lnet/minecraft/class_4970;method_9603(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;)I- official - b- Ldwx;b(Ldwy;Ldfo;Lji;Ljn;)I
 
- 
emitsRedstonePowerReturns whether the block is capable of emitting redstone power.This does not return whether the block is currently emitting redstone power. Use RedstoneView.isEmittingRedstonePower(net.minecraft.util.math.BlockPos, net.minecraft.util.math.Direction)in that case.- Overrides:
- emitsRedstonePowerin class- AbstractBlock
- Returns:
- whether the block is capable of emitting redstone power
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - emitsRedstonePower- Lnet/minecraft/block/AbstractBlock;emitsRedstonePower(Lnet/minecraft/block/BlockState;)Z- intermediary - method_9506- Lnet/minecraft/class_4970;method_9506(Lnet/minecraft/class_2680;)Z- official - f_- Ldwx;f_(Ldwy;)Z
 
- 
randomDisplayTickCalled randomly on the client. Blocks may override this to spawn particles. UnlikeAbstractBlock.randomTick(net.minecraft.block.BlockState, net.minecraft.server.world.ServerWorld, net.minecraft.util.math.BlockPos, net.minecraft.util.math.random.Random)this is not affected by a game rule.- Overrides:
- randomDisplayTickin class- Block
- Mappings:
- Namespace - Name - Mixin selector - named - randomDisplayTick- Lnet/minecraft/block/Block;randomDisplayTick(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/random/Random;)V- intermediary - method_9496- Lnet/minecraft/class_2248;method_9496(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_5819;)V- official - a- Ldjn;a(Ldwy;Ldgj;Lji;Lazh;)V
 
- 
appendPropertiesAppends block state properties to this block. To use this, override and callStateManager.Builder.add(net.minecraft.state.property.Property<?>[])inside the method. SeePropertiesfor the list of pre-defined properties.- Overrides:
- appendPropertiesin class- Block
- Mappings:
- Namespace - Name - Mixin selector - named - appendProperties- Lnet/minecraft/block/Block;appendProperties(Lnet/minecraft/state/StateManager$Builder;)V- intermediary - method_9515- Lnet/minecraft/class_2248;method_9515(Lnet/minecraft/class_2689$class_2690;)V- official - a- Ldjn;a(Ldwz$a;)V
 
- 
isBurnedOut- Mappings:
- Namespace - Name - Mixin selector - named - isBurnedOut- Lnet/minecraft/block/RedstoneTorchBlock;isBurnedOut(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Z)Z- intermediary - method_10489- Lnet/minecraft/class_2459;method_10489(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Z)Z- official - a- Ldpw;a(Ldgj;Lji;Z)Z
 
- 
getEmissionOrientation- Mappings:
- Namespace - Name - Mixin selector - named - getEmissionOrientation- Lnet/minecraft/block/RedstoneTorchBlock;getEmissionOrientation(Lnet/minecraft/world/World;Lnet/minecraft/block/BlockState;)Lnet/minecraft/world/block/WireOrientation;- intermediary - method_61748- Lnet/minecraft/class_2459;method_61748(Lnet/minecraft/class_1937;Lnet/minecraft/class_2680;)Lnet/minecraft/class_9904;- official - a- Ldpw;a(Ldgj;Ldwy;)Leui;
 
 
-