public class EnchantingTableBlock extends BlockWithEntity
Block.NeighborGroupAbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>| Modifier and Type | Field and Description |
|---|---|
protected static VoxelShape |
SHAPE |
LOGGER, STATE_IDS, stateManagercollidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier| Modifier | Constructor and Description |
|---|---|
protected |
EnchantingTableBlock(AbstractBlock.Settings settings) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canPathfindThrough(BlockState state,
BlockView world,
BlockPos pos,
NavigationType type) |
BlockEntity |
createBlockEntity(BlockView world) |
NamedScreenHandlerFactory |
createScreenHandlerFactory(BlockState state,
World world,
BlockPos pos) |
VoxelShape |
getOutlineShape(BlockState state,
BlockView world,
BlockPos pos,
ShapeContext context) |
BlockRenderType |
getRenderType(BlockState state) |
boolean |
hasSidedTransparency(BlockState state) |
void |
onPlaced(World world,
BlockPos pos,
BlockState state,
LivingEntity placer,
ItemStack itemStack) |
ActionResult |
onUse(BlockState state,
World world,
BlockPos pos,
PlayerEntity player,
Hand hand,
BlockHitResult hit)
Called when this block is used by a player.
|
void |
randomDisplayTick(BlockState state,
World world,
BlockPos pos,
Random random) |
onSyncedBlockEventaddStacksForDisplay, afterBreak, appendProperties, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getPlacementState, getRawIdFromState, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, is, isFaceFullSquare, isIn, isShapeFullCube, isTranslucent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onSteppedOn, postProcessState, pushEntitiesUpBeforeBlockChange, rainTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toStringcalcBlockBreakingDelta, canBucketPlace, canPlaceAt, canReplace, emitsRedstonePower, getAmbientOcclusionLightLevel, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMaterialColor, getDroppedStacks, getFluidState, getLootTableId, getOffsetType, getOpacity, getPistonBehavior, getRaycastShape, getRenderingSeed, getSidesShape, getStateForNeighborUpdate, getStrongRedstonePower, getVisualShape, getWeakRedstonePower, hasBlockEntity, hasComparatorOutput, isSideInvisible, mirror, neighborUpdate, onBlockAdded, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onStateReplaced, prepare, randomTick, rotate, scheduledTickprotected static final VoxelShape SHAPE
protected EnchantingTableBlock(AbstractBlock.Settings settings)
public boolean hasSidedTransparency(BlockState state)
hasSidedTransparency in class AbstractBlockpublic VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)
getOutlineShape in class AbstractBlock@Environment(value=CLIENT) public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random random)
randomDisplayTick in class Blockpublic BlockRenderType getRenderType(BlockState state)
getRenderType in class BlockWithEntitypublic BlockEntity createBlockEntity(BlockView world)
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit)
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.
onUse in class AbstractBlock@Nullable public NamedScreenHandlerFactory createScreenHandlerFactory(BlockState state, World world, BlockPos pos)
createScreenHandlerFactory in class BlockWithEntitypublic void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack)
public boolean canPathfindThrough(BlockState state, BlockView world, BlockPos pos, NavigationType type)
canPathfindThrough in class AbstractBlock