Class LecternBlock
- All Implemented Interfaces:
- BlockEntityProvider,- ItemConvertible,- ToggleableFeature
- Mappings:
- Namespace - Name - official - ctv- intermediary - net/minecraft/class_3715- named - net/minecraft/block/LecternBlock
- 
Nested Class SummaryNested classes/interfaces inherited from class net.minecraft.block.BlockBlock.NeighborGroupNested classes/interfaces inherited from class net.minecraft.block.AbstractBlockAbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.Offsetter, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final VoxelShapestatic final VoxelShapestatic final VoxelShapestatic final VoxelShapestatic final VoxelShapestatic final DirectionPropertystatic final BooleanPropertystatic final VoxelShapestatic final VoxelShapestatic final BooleanPropertyprivate static final intstatic final VoxelShapestatic final VoxelShapeFields inherited from class net.minecraft.block.Blockfield_31022, field_31023, field_31024, field_31025, field_31035, FORCE_STATE, MOVED, NO_REDRAW, NOTIFY_ALL, NOTIFY_LISTENERS, NOTIFY_NEIGHBORS, REDRAW_ON_MAIN_THREAD, SKIP_DROPS, STATE_IDS, stateManagerFields inherited from class net.minecraft.block.AbstractBlockcollidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableId, randomTicks, requiredFeatures, resistance, settings, slipperiness, soundGroup, 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.booleancanPathfindThrough(BlockState state, BlockView world, BlockPos pos, NavigationType type) Returns if an entity using navigation typetypecan navigate through this block.createBlockEntity(BlockPos pos, BlockState state) Returns a new block entity instance.createScreenHandlerFactory(BlockState state, World world, BlockPos pos) Returns the screen handler factory ornullif screen handler cannot be created.private voiddropBook(BlockState state, World world, BlockPos pos) booleanemitsRedstonePower(BlockState state) Returns whether the block is capable of emitting redstone power.getCollisionShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) intgetComparatorOutput(BlockState state, World world, BlockPos pos) Returns the comparator output of the block, from0to15.getCullingShape(BlockState state, BlockView world, BlockPos pos) getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) getRenderType(BlockState state) Returns the block's render type (invisible, animated, model).intgetStrongRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction) Returns the strong redstone power emitted from the block.intgetWeakRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction) Returns the weak redstone power emitted from the block.booleanhasComparatorOutput(BlockState state) Returns whether the block can have a comparator output.booleanhasSidedTransparency(BlockState state) Returns whether the block's transparency depends on the side of the block, like slabs.mirror(BlockState state, BlockMirror mirror) Returnsstatemirrored bymirror.voidonStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) Called server-side on the old block when the block state is changed.onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.private voidopenScreen(World world, BlockPos pos, PlayerEntity player) private static voidstatic booleanputBookIfAbsent(@Nullable Entity user, World world, BlockPos pos, BlockState state, ItemStack stack) rotate(BlockState state, BlockRotation rotation) Returnsstaterotated byrotation.voidscheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random) Called server-side when a block receives a scheduled tick.static voidsetHasBook(@Nullable Entity user, World world, BlockPos pos, BlockState state, boolean hasBook) static voidsetPowered(World world, BlockPos pos, BlockState state) private static voidsetPowered(World world, BlockPos pos, BlockState state, boolean powered) private static voidupdateNeighborAlways(World world, BlockPos pos, BlockState state) Methods inherited from class net.minecraft.block.BlockWithEntitycheckType, onSyncedBlockEventMethods 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, getPickStack, getRawIdFromState, getRegistryEntry, getShapesForStates, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getStateWithProperties, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, isFaceFullSquare, isShapeFullCube, isTransparent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, spawnBreakParticles, toStringMethods inherited from class net.minecraft.block.AbstractBlockcalcBlockBreakingDelta, canBucketPlace, canPlaceAt, canReplace, getAmbientOcclusionLightLevel, getCameraCollisionShape, getDefaultMapColor, getDroppedStacks, getFluidState, getHardness, getLootTableId, getMaxHorizontalModelOffset, getOpacity, getRaycastShape, getRenderingSeed, getRequiredFeatures, getSidesShape, getStateForNeighborUpdate, getVerticalModelOffsetMultiplier, isCullingShapeFullCube, isShapeFullCube, isSideInvisible, neighborUpdate, onBlockAdded, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, prepare, randomTickMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.block.BlockEntityProvidergetGameEventListener, getTickerMethods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeatureisEnabled
- 
Field Details- 
FACING- Mappings:
- Namespace - Name - Mixin selector - official - a- Lctv;a:Ldcv;- intermediary - field_16404- Lnet/minecraft/class_3715;field_16404:Lnet/minecraft/class_2753;- named - FACING- Lnet/minecraft/block/LecternBlock;FACING:Lnet/minecraft/state/property/DirectionProperty;
 
- 
POWERED- Mappings:
- Namespace - Name - Mixin selector - official - b- Lctv;b:Ldcs;- intermediary - field_17365- Lnet/minecraft/class_3715;field_17365:Lnet/minecraft/class_2746;- named - POWERED- Lnet/minecraft/block/LecternBlock;POWERED:Lnet/minecraft/state/property/BooleanProperty;
 
- 
HAS_BOOK- Mappings:
- Namespace - Name - Mixin selector - official - c- Lctv;c:Ldcs;- intermediary - field_17366- Lnet/minecraft/class_3715;field_17366:Lnet/minecraft/class_2746;- named - HAS_BOOK- Lnet/minecraft/block/LecternBlock;HAS_BOOK:Lnet/minecraft/state/property/BooleanProperty;
 
- 
BOTTOM_SHAPE- Mappings:
- Namespace - Name - Mixin selector - official - d- Lctv;d:Lefb;- intermediary - field_16406- Lnet/minecraft/class_3715;field_16406:Lnet/minecraft/class_265;- named - BOTTOM_SHAPE- Lnet/minecraft/block/LecternBlock;BOTTOM_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
 
- 
MIDDLE_SHAPE- Mappings:
- Namespace - Name - Mixin selector - official - e- Lctv;e:Lefb;- intermediary - field_16405- Lnet/minecraft/class_3715;field_16405:Lnet/minecraft/class_265;- named - MIDDLE_SHAPE- Lnet/minecraft/block/LecternBlock;MIDDLE_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
 
- 
BASE_SHAPE- Mappings:
- Namespace - Name - Mixin selector - official - f- Lctv;f:Lefb;- intermediary - field_16403- Lnet/minecraft/class_3715;field_16403:Lnet/minecraft/class_265;- named - BASE_SHAPE- Lnet/minecraft/block/LecternBlock;BASE_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
 
- 
COLLISION_SHAPE_TOP- Mappings:
- Namespace - Name - Mixin selector - official - g- Lctv;g:Lefb;- intermediary - field_17367- Lnet/minecraft/class_3715;field_17367:Lnet/minecraft/class_265;- named - COLLISION_SHAPE_TOP- Lnet/minecraft/block/LecternBlock;COLLISION_SHAPE_TOP:Lnet/minecraft/util/shape/VoxelShape;
 
- 
COLLISION_SHAPE- Mappings:
- Namespace - Name - Mixin selector - official - h- Lctv;h:Lefb;- intermediary - field_17368- Lnet/minecraft/class_3715;field_17368:Lnet/minecraft/class_265;- named - COLLISION_SHAPE- Lnet/minecraft/block/LecternBlock;COLLISION_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
 
- 
WEST_SHAPE- Mappings:
- Namespace - Name - Mixin selector - official - i- Lctv;i:Lefb;- intermediary - field_17369- Lnet/minecraft/class_3715;field_17369:Lnet/minecraft/class_265;- named - WEST_SHAPE- Lnet/minecraft/block/LecternBlock;WEST_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
 
- 
NORTH_SHAPE- Mappings:
- Namespace - Name - Mixin selector - official - j- Lctv;j:Lefb;- intermediary - field_17370- Lnet/minecraft/class_3715;field_17370:Lnet/minecraft/class_265;- named - NORTH_SHAPE- Lnet/minecraft/block/LecternBlock;NORTH_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
 
- 
EAST_SHAPE- Mappings:
- Namespace - Name - Mixin selector - official - k- Lctv;k:Lefb;- intermediary - field_17371- Lnet/minecraft/class_3715;field_17371:Lnet/minecraft/class_265;- named - EAST_SHAPE- Lnet/minecraft/block/LecternBlock;EAST_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
 
- 
SOUTH_SHAPE- Mappings:
- Namespace - Name - Mixin selector - official - l- Lctv;l:Lefb;- intermediary - field_17372- Lnet/minecraft/class_3715;field_17372:Lnet/minecraft/class_265;- named - SOUTH_SHAPE- Lnet/minecraft/block/LecternBlock;SOUTH_SHAPE:Lnet/minecraft/util/shape/VoxelShape;
 
- 
SCHEDULED_TICK_DELAYprivate static final int SCHEDULED_TICK_DELAY- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - m- Lctv;m:I- intermediary - field_31113- Lnet/minecraft/class_3715;field_31113:I- named - SCHEDULED_TICK_DELAY- Lnet/minecraft/block/LecternBlock;SCHEDULED_TICK_DELAY:I
 
 
- 
- 
Constructor Details- 
LecternBlock- Mappings:
- Namespace - Name - Mixin selector - official - <init>- Ldca;<init>(Ldca$d;)V- intermediary - <init>- Lnet/minecraft/class_4970;<init>(Lnet/minecraft/class_4970$class_2251;)V- named - <init>- Lnet/minecraft/block/AbstractBlock;<init>(Lnet/minecraft/block/AbstractBlock$Settings;)V
 
 
- 
- 
Method Details- 
getRenderTypeReturns the block's render type (invisible, animated, model).- Overrides:
- getRenderTypein class- BlockWithEntity
- Returns:
- the block's render type (invisible, animated, model)
- Mappings:
- Namespace - Name - Mixin selector - official - b_- Ldca;b_(Ldcb;)Lcvs;- intermediary - method_9604- Lnet/minecraft/class_4970;method_9604(Lnet/minecraft/class_2680;)Lnet/minecraft/class_2464;- named - getRenderType- Lnet/minecraft/block/AbstractBlock;getRenderType(Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/BlockRenderType;
 
- 
getCullingShape- Overrides:
- getCullingShapein class- AbstractBlock
- Mappings:
- Namespace - Name - Mixin selector - official - f- Ldca;f(Ldcb;Lcls;Lgu;)Lefb;- intermediary - method_9571- Lnet/minecraft/class_4970;method_9571(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;)Lnet/minecraft/class_265;- named - getCullingShape- Lnet/minecraft/block/AbstractBlock;getCullingShape(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/shape/VoxelShape;
 
- 
hasSidedTransparencyReturns whether the block's transparency depends on the side of the block, like slabs.- Overrides:
- hasSidedTransparencyin class- AbstractBlock
- Returns:
- whether the block's transparency depends on the side of the block, like slabs
- Mappings:
- Namespace - Name - Mixin selector - official - g_- Ldca;g_(Ldcb;)Z- intermediary - method_9526- Lnet/minecraft/class_4970;method_9526(Lnet/minecraft/class_2680;)Z- named - hasSidedTransparency- Lnet/minecraft/block/AbstractBlock;hasSidedTransparency(Lnet/minecraft/block/BlockState;)Z
 
- 
getPlacementState- Overrides:
- getPlacementStatein class- Block
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lcpn;a(Lcih;)Ldcb;- intermediary - method_9605- Lnet/minecraft/class_2248;method_9605(Lnet/minecraft/class_1750;)Lnet/minecraft/class_2680;- named - getPlacementState- Lnet/minecraft/block/Block;getPlacementState(Lnet/minecraft/item/ItemPlacementContext;)Lnet/minecraft/block/BlockState;
 
- 
getCollisionShapepublic VoxelShape getCollisionShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) - Overrides:
- getCollisionShapein class- AbstractBlock
- Mappings:
- Namespace - Name - Mixin selector - official - c- Ldca;c(Ldcb;Lcls;Lgu;Leen;)Lefb;- intermediary - method_9549- Lnet/minecraft/class_4970;method_9549(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_3726;)Lnet/minecraft/class_265;- named - getCollisionShape- Lnet/minecraft/block/AbstractBlock;getCollisionShape(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/ShapeContext;)Lnet/minecraft/util/shape/VoxelShape;
 
- 
getOutlineShapepublic VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) - Overrides:
- getOutlineShapein class- AbstractBlock
- Mappings:
- Namespace - Name - Mixin selector - official - a- Ldca;a(Ldcb;Lcls;Lgu;Leen;)Lefb;- intermediary - method_9530- Lnet/minecraft/class_4970;method_9530(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_3726;)Lnet/minecraft/class_265;- named - getOutlineShape- Lnet/minecraft/block/AbstractBlock;getOutlineShape(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/ShapeContext;)Lnet/minecraft/util/shape/VoxelShape;
 
- 
rotateReturnsstaterotated byrotation.By default, this returns the provided block state. - Overrides:
- rotatein class- AbstractBlock
- Returns:
- staterotated by- rotation
- Mappings:
- Namespace - Name - Mixin selector - official - a- Ldca;a(Ldcb;Lcvz;)Ldcb;- intermediary - method_9598- Lnet/minecraft/class_4970;method_9598(Lnet/minecraft/class_2680;Lnet/minecraft/class_2470;)Lnet/minecraft/class_2680;- named - rotate- Lnet/minecraft/block/AbstractBlock;rotate(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/BlockRotation;)Lnet/minecraft/block/BlockState;
 
- 
mirrorReturnsstatemirrored bymirror.By default, this returns the provided block state. - Overrides:
- mirrorin class- AbstractBlock
- Returns:
- statemirrored by- mirror
- Mappings:
- Namespace - Name - Mixin selector - official - a- Ldca;a(Ldcb;Lcui;)Ldcb;- intermediary - method_9569- Lnet/minecraft/class_4970;method_9569(Lnet/minecraft/class_2680;Lnet/minecraft/class_2415;)Lnet/minecraft/class_2680;- named - mirror- Lnet/minecraft/block/AbstractBlock;mirror(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/BlockMirror;)Lnet/minecraft/block/BlockState;
 
- 
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 - official - a- Lcpn;a(Ldcc$a;)V- intermediary - method_9515- Lnet/minecraft/class_2248;method_9515(Lnet/minecraft/class_2689$class_2690;)V- named - appendProperties- Lnet/minecraft/block/Block;appendProperties(Lnet/minecraft/state/StateManager$Builder;)V
 
- 
createBlockEntityReturns a new block entity instance.For example: @Override public BlockEntity createBlockEntity(BlockPos pos, BlockState state) { return new MyBlockEntity(pos, state); }- Returns:
- a new block entity instance
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lcsb;a(Lgu;Ldcb;)Lczn;- intermediary - method_10123- Lnet/minecraft/class_2343;method_10123(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Lnet/minecraft/class_2586;- named - createBlockEntity- Lnet/minecraft/block/BlockEntityProvider;createBlockEntity(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/entity/BlockEntity;
 
- 
putBookIfAbsentpublic static boolean putBookIfAbsent(@Nullable @Nullable Entity user, World world, BlockPos pos, BlockState state, ItemStack stack) - Mappings:
- Namespace - Name - Mixin selector - official - a- Lctv;a(Lbfj;Lcmm;Lgu;Ldcb;Lcfz;)Z- intermediary - method_17472- Lnet/minecraft/class_3715;method_17472(Lnet/minecraft/class_1297;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_1799;)Z- named - putBookIfAbsent- Lnet/minecraft/block/LecternBlock;putBookIfAbsent(Lnet/minecraft/entity/Entity;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/item/ItemStack;)Z
 
- 
putBookprivate static void putBook(@Nullable @Nullable Entity user, World world, BlockPos pos, BlockState state, ItemStack stack) - Mappings:
- Namespace - Name - Mixin selector - official - b- Lctv;b(Lbfj;Lcmm;Lgu;Ldcb;Lcfz;)V- intermediary - method_17475- Lnet/minecraft/class_3715;method_17475(Lnet/minecraft/class_1297;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_1799;)V- named - putBook- Lnet/minecraft/block/LecternBlock;putBook(Lnet/minecraft/entity/Entity;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/item/ItemStack;)V
 
- 
setHasBookpublic static void setHasBook(@Nullable @Nullable Entity user, World world, BlockPos pos, BlockState state, boolean hasBook) - Mappings:
- Namespace - Name - Mixin selector - official - a- Lctv;a(Lbfj;Lcmm;Lgu;Ldcb;Z)V- intermediary - method_17473- Lnet/minecraft/class_3715;method_17473(Lnet/minecraft/class_1297;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Z)V- named - setHasBook- Lnet/minecraft/block/LecternBlock;setHasBook(Lnet/minecraft/entity/Entity;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Z)V
 
- 
setPowered- Mappings:
- Namespace - Name - Mixin selector - official - a- Lctv;a(Lcmm;Lgu;Ldcb;)V- intermediary - method_17471- Lnet/minecraft/class_3715;method_17471(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V- named - setPowered- Lnet/minecraft/block/LecternBlock;setPowered(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
 
- 
setPowered- Mappings:
- Namespace - Name - Mixin selector - official - a- Lctv;a(Lcmm;Lgu;Ldcb;Z)V- intermediary - method_17476- Lnet/minecraft/class_3715;method_17476(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Z)V- named - setPowered- Lnet/minecraft/block/LecternBlock;setPowered(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Z)V
 
- 
updateNeighborAlways- Mappings:
- Namespace - Name - Mixin selector - official - b- Lctv;b(Lcmm;Lgu;Ldcb;)V- intermediary - method_17474- Lnet/minecraft/class_3715;method_17474(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V- named - updateNeighborAlways- Lnet/minecraft/block/LecternBlock;updateNeighborAlways(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
 
- 
scheduledTickCalled server-side when a block receives a scheduled tick. This can be used like a timer. Scheduled ticks are added usingWorldAccess.scheduleBlockTick(BlockPos, Block, int). Additionally,AbstractBlock.randomTick(net.minecraft.block.BlockState, net.minecraft.server.world.ServerWorld, net.minecraft.util.math.BlockPos, net.minecraft.util.math.random.Random)by default calls this method; overrideAbstractBlock.randomTick(net.minecraft.block.BlockState, net.minecraft.server.world.ServerWorld, net.minecraft.util.math.BlockPos, net.minecraft.util.math.random.Random)to disable this behavior.Scheduled ticks are often used inside AbstractBlock.getStateForNeighborUpdate(net.minecraft.block.BlockState, net.minecraft.util.math.Direction, net.minecraft.block.BlockState, net.minecraft.world.WorldAccess, net.minecraft.util.math.BlockPos, net.minecraft.util.math.BlockPos).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 - official - a- Ldca;a(Ldcb;Laif;Lgu;Lapf;)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- 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
 
- 
onStateReplacedpublic 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.- Overrides:
- onStateReplacedin class- AbstractBlock
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - a- Ldca;a(Ldcb;Lcmm;Lgu;Ldcb;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- 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
 
- 
dropBook- Mappings:
- Namespace - Name - Mixin selector - official - d- Lctv;d(Ldcb;Lcmm;Lgu;)V- intermediary - method_17477- Lnet/minecraft/class_3715;method_17477(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)V- named - dropBook- Lnet/minecraft/block/LecternBlock;dropBook(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)V
 
- 
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 - official - f_- Ldca;f_(Ldcb;)Z- intermediary - method_9506- Lnet/minecraft/class_4970;method_9506(Lnet/minecraft/class_2680;)Z- named - emitsRedstonePower- Lnet/minecraft/block/AbstractBlock;emitsRedstonePower(Lnet/minecraft/block/BlockState;)Z
 
- 
getWeakRedstonePowerpublic 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 AbstractBlock.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 - official - a- Ldca;a(Ldcb;Lcls;Lgu;Lha;)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- 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
 
- 
getStrongRedstonePowerpublic 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 AbstractBlock.emitsRedstonePower(net.minecraft.block.BlockState)to returntrue.AbstractBlock.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 - official - b- Ldca;b(Ldcb;Lcls;Lgu;Lha;)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- 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
 
- 
hasComparatorOutputReturns whether the block can have a comparator output.This does not check the current comparator output of the block. Use AbstractBlock.getComparatorOutput(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos)in that case.- Overrides:
- hasComparatorOutputin class- AbstractBlock
- Returns:
- whether the block can have a comparator output
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - d_- Ldca;d_(Ldcb;)Z- intermediary - method_9498- Lnet/minecraft/class_4970;method_9498(Lnet/minecraft/class_2680;)Z- named - hasComparatorOutput- Lnet/minecraft/block/AbstractBlock;hasComparatorOutput(Lnet/minecraft/block/BlockState;)Z
 
- 
getComparatorOutputReturns the comparator output of the block, from0to15.When overriding this, AbstractBlock.hasComparatorOutput(net.minecraft.block.BlockState)must also be overridden.- Overrides:
- getComparatorOutputin class- AbstractBlock
- Returns:
- the comparator output of the block, from 0to15
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - a- Ldca;a(Ldcb;Lcmm;Lgu;)I- intermediary - method_9572- Lnet/minecraft/class_4970;method_9572(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)I- named - getComparatorOutput- Lnet/minecraft/block/AbstractBlock;getComparatorOutput(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)I
 
- 
onUsepublic 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 class- AbstractBlock
- Returns:
- an action result that specifies if using the block was successful.
- Mappings:
- Namespace - Name - Mixin selector - official - a- Ldca;a(Ldcb;Lcmm;Lgu;Lbyo;Lbdw;Leee;)Lbdx;- intermediary - method_9534- Lnet/minecraft/class_4970;method_9534(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;Lnet/minecraft/class_3965;)Lnet/minecraft/class_1269;- named - onUse- Lnet/minecraft/block/AbstractBlock;onUse(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;Lnet/minecraft/util/hit/BlockHitResult;)Lnet/minecraft/util/ActionResult;
 
- 
createScreenHandlerFactory@Nullable public @Nullable NamedScreenHandlerFactory createScreenHandlerFactory(BlockState state, World world, BlockPos pos) Returns the screen handler factory ornullif screen handler cannot be created.This method should be overridden for blocks with screen handlers, such as anvils. The created screen handler is usually passed to PlayerEntity.openHandledScreen(net.minecraft.screen.NamedScreenHandlerFactory). SeeAnvilBlock.createScreenHandlerFactory(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos)for basic usage.BlockWithEntitydelegates this logic to the block entity implementingNamedScreenHandlerFactory. For example, anyBlockWithEntitywhose block entity extendsLockableContainerBlockEntityneeds to overrideLockableContainerBlockEntity.createScreenHandler(int, net.minecraft.entity.player.PlayerInventory)instead of this method.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:
- createScreenHandlerFactoryin class- BlockWithEntity
- Returns:
- the screen handler factory or nullif screen handler cannot be created
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - b- Ldca;b(Ldcb;Lcmm;Lgu;)Lbea;- intermediary - method_17454- Lnet/minecraft/class_4970;method_17454(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)Lnet/minecraft/class_3908;- named - createScreenHandlerFactory- Lnet/minecraft/block/AbstractBlock;createScreenHandlerFactory(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/screen/NamedScreenHandlerFactory;
 
- 
openScreen- Mappings:
- Namespace - Name - Mixin selector - official - a- Lctv;a(Lcmm;Lgu;Lbyo;)V- intermediary - method_17470- Lnet/minecraft/class_3715;method_17470(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1657;)V- named - openScreen- Lnet/minecraft/block/LecternBlock;openScreen(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/PlayerEntity;)V
 
 
-