Class EnchantingTableBlock
- All Implemented Interfaces:
- BlockEntityProvider,- ItemConvertible,- ToggleableFeature
- Mappings:
- Namespace - Name - named - net/minecraft/block/EnchantingTableBlock- intermediary - net/minecraft/class_2331- official - dma
- 
Nested Class SummaryNested 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 com.mojang.serialization.MapCodec<EnchantingTableBlock> protected static final VoxelShapeFields 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 TypeMethodDescriptionstatic booleancanAccessPowerProvider(World world, BlockPos tablePos, BlockPos providerOffset) protected booleancanPathfindThrough(BlockState state, NavigationType type) Returns if an entity using navigation typetypecan navigate through this block.createBlockEntity(BlockPos pos, BlockState state) Returns a new block entity instance.protected @Nullable NamedScreenHandlerFactorycreateScreenHandlerFactory(BlockState state, World world, BlockPos pos) Returns the screen handler factory ornullif screen handler cannot be created.com.mojang.serialization.MapCodec<EnchantingTableBlock> getCodec()protected VoxelShapegetOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) <T extends BlockEntity>
 @Nullable BlockEntityTicker<T> getTicker(World world, BlockState state, BlockEntityType<T> type) Returns the "ticker" for the block's block entity, ornullif the block entity does not need to be ticked.protected booleanhasSidedTransparency(BlockState state) Returns whether the block's transparency depends on the side of the block, like slabs.protected ActionResultonUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) voidrandomDisplayTick(BlockState state, World world, BlockPos pos, Random random) Called randomly on the client.Methods inherited from class net.minecraft.block.BlockWithEntityonSyncedBlockEvent, validateTickerMethods inherited from class net.minecraft.block.BlockafterBreak, appendProperties, 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, canPlaceAt, canReplace, createCodec, createSettingsCodec, emitsRedstonePower, getAmbientOcclusionLightLevel, getCameraCollisionShape, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getFluidState, getHardness, getInsideCollisionShape, getLootTableKey, getMaxHorizontalModelOffset, getOpacity, getPickStack, getRaycastShape, getRenderingSeed, getRenderType, getRequiredFeatures, getSettings, getSidesShape, getSoundGroup, getStateForNeighborUpdate, getStrongRedstonePower, getTranslationKey, getVerticalModelOffsetMultiplier, getWeakRedstonePower, hasComparatorOutput, hasRandomTicks, isShapeFullCube, isSideInvisible, isTransparent, mirror, neighborUpdate, onBlockAdded, onBlockBreakStart, onEntityCollision, onExploded, onProjectileHit, onStacksDropped, onStateReplaced, onUseWithItem, prepare, randomTick, rotate, scheduledTickMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.block.BlockEntityProvidergetGameEventListenerMethods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeatureisEnabled
- 
Field Details- 
CODEC- Mappings:
- Namespace - Name - Mixin selector - named - CODEC- Lnet/minecraft/block/EnchantingTableBlock;CODEC:Lcom/mojang/serialization/MapCodec;- intermediary - field_46342- Lnet/minecraft/class_2331;field_46342:Lcom/mojang/serialization/MapCodec;- official - a- Ldma;a:Lcom/mojang/serialization/MapCodec;
 
- 
SHAPE- Mappings:
- Namespace - Name - Mixin selector - named - SHAPE- Lnet/minecraft/block/EnchantingTableBlock;SHAPE:Lnet/minecraft/util/shape/VoxelShape;- intermediary - field_10951- Lnet/minecraft/class_2331;field_10951:Lnet/minecraft/class_265;- official - b- Ldma;b:Lfbv;
 
- 
POWER_PROVIDER_OFFSETS- Mappings:
- Namespace - Name - Mixin selector - named - POWER_PROVIDER_OFFSETS- Lnet/minecraft/block/EnchantingTableBlock;POWER_PROVIDER_OFFSETS:Ljava/util/List;- intermediary - field_36535- Lnet/minecraft/class_2331;field_36535:Ljava/util/List;- official - c- Ldma;c:Ljava/util/List;
 
 
- 
- 
Constructor Details- 
EnchantingTableBlock- 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- BlockWithEntity
- 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;
 
- 
canAccessPowerProviderpublic static boolean canAccessPowerProvider(World world, BlockPos tablePos, BlockPos providerOffset) - Mappings:
- Namespace - Name - Mixin selector - named - canAccessPowerProvider- Lnet/minecraft/block/EnchantingTableBlock;canAccessPowerProvider(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/BlockPos;)Z- intermediary - method_40445- Lnet/minecraft/class_2331;method_40445(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2338;)Z- official - a- Ldma;a(Ldgj;Lji;Lji;)Z
 
- 
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
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - hasSidedTransparency- Lnet/minecraft/block/AbstractBlock;hasSidedTransparency(Lnet/minecraft/block/BlockState;)Z- intermediary - method_9526- Lnet/minecraft/class_4970;method_9526(Lnet/minecraft/class_2680;)Z- official - g_- Ldwx;g_(Ldwy;)Z
 
- 
getOutlineShapeprotected VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) - Overrides:
- getOutlineShapein class- AbstractBlock
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - 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;- 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;- official - a- Ldwx;a(Ldwy;Ldfo;Lji;Lfbg;)Lfbv;
 
- 
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
 
- 
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
- Implementation Note:
- While this is marked as nullable, in practice this should never return
 null.PistonExtensionBlockis the only block in vanilla that returnsnullinside the implementation.
- Mappings:
- Namespace - Name - Mixin selector - named - createBlockEntity- Lnet/minecraft/block/BlockEntityProvider;createBlockEntity(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/entity/BlockEntity;- intermediary - method_10123- Lnet/minecraft/class_2343;method_10123(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Lnet/minecraft/class_2586;- official - a- Ldmg;a(Lji;Ldwy;)Ldua;
 
- 
getTicker@Nullable public <T extends BlockEntity> @Nullable BlockEntityTicker<T> getTicker(World world, BlockState state, BlockEntityType<T> type) Returns the "ticker" for the block's block entity, ornullif the block entity does not need to be ticked.Ticker is a functional interface called every tick to tick the block entity on both the client and the server. Tickers should validate that the passed typeis the one this block expects, and returnnullif it isn't. This is to prevent crashes in rare cases where a mismatch occurs between the position's block and block entity.BlockWithEntity.validateTicker(net.minecraft.block.entity.BlockEntityType<A>, net.minecraft.block.entity.BlockEntityType<E>, net.minecraft.block.entity.BlockEntityTicker<? super E>)can be used to implement the check.Example: public <T extends BlockEntity> BlockEntityTicker<T> getTicker(World world, BlockState state, BlockEntityType<T> type) { if (type != YourMod.MY_BLOCK_ENTITY_TYPE) return null; // This should be a static method usable as a BlockEntityTicker. return YourBlockEntity::tick; }- Returns:
- the "ticker" for the block's block entity, or nullif the block entity does not need to be ticked
- Mappings:
- Namespace - Name - Mixin selector - named - getTicker- Lnet/minecraft/block/BlockEntityProvider;getTicker(Lnet/minecraft/world/World;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/entity/BlockEntityType;)Lnet/minecraft/block/entity/BlockEntityTicker;- intermediary - method_31645- Lnet/minecraft/class_2343;method_31645(Lnet/minecraft/class_1937;Lnet/minecraft/class_2680;Lnet/minecraft/class_2591;)Lnet/minecraft/class_5558;- official - a- Ldmg;a(Ldgj;Ldwy;Lduc;)Ldub;
 
- 
onUseprotected ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) - Overrides:
- onUsein class- AbstractBlock
- Mappings:
- Namespace - Name - Mixin selector - 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/hit/BlockHitResult;)Lnet/minecraft/util/ActionResult;- intermediary - method_55766- Lnet/minecraft/class_4970;method_55766(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1657;Lnet/minecraft/class_3965;)Lnet/minecraft/class_1269;- official - a- Ldwx;a(Ldwy;Ldgj;Lji;Lcoy;Lfax;)Lbsl;
 
- 
createScreenHandlerFactory@Nullable protected @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 - named - createScreenHandlerFactory- Lnet/minecraft/block/AbstractBlock;createScreenHandlerFactory(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/screen/NamedScreenHandlerFactory;- 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;- official - b- Ldwx;b(Ldwy;Ldgj;Lji;)Lbsn;
 
 
-