public class LecternBlock extends BlockWithEntity
Block.NeighborGroupAbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>| Modifier and Type | Field and Description |
|---|---|
static VoxelShape |
BASE_SHAPE |
static VoxelShape |
BOTTOM_SHAPE |
static VoxelShape |
COLLISION_SHAPE |
static VoxelShape |
COLLISION_SHAPE_TOP |
static VoxelShape |
EAST_SHAPE |
static DirectionProperty |
FACING |
static BooleanProperty |
HAS_BOOK |
static VoxelShape |
MIDDLE_SHAPE |
static VoxelShape |
NORTH_SHAPE |
static BooleanProperty |
POWERED |
static VoxelShape |
SOUTH_SHAPE |
static VoxelShape |
WEST_SHAPE |
LOGGER, STATE_IDS, stateManagercollidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier| Modifier | Constructor and Description |
|---|---|
protected |
LecternBlock(AbstractBlock.Settings settings) |
onSyncedBlockEventaddStacksForDisplay, afterBreak, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getRawIdFromState, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, is, isFaceFullSquare, isIn, isShapeFullCube, isTranslucent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, pushEntitiesUpBeforeBlockChange, rainTick, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toStringcalcBlockBreakingDelta, canBucketPlace, canPlaceAt, canReplace, getAmbientOcclusionLightLevel, getDefaultMaterialColor, getDroppedStacks, getFluidState, getLootTableId, getOffsetType, getOpacity, getPistonBehavior, getRaycastShape, getRenderingSeed, getSidesShape, getStateForNeighborUpdate, getVisualShape, hasBlockEntity, isSideInvisible, neighborUpdate, onBlockAdded, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, prepare, randomTickpublic static final DirectionProperty FACING
public static final BooleanProperty POWERED
public static final BooleanProperty HAS_BOOK
public static final VoxelShape BOTTOM_SHAPE
public static final VoxelShape MIDDLE_SHAPE
public static final VoxelShape BASE_SHAPE
public static final VoxelShape COLLISION_SHAPE_TOP
public static final VoxelShape COLLISION_SHAPE
public static final VoxelShape WEST_SHAPE
public static final VoxelShape NORTH_SHAPE
public static final VoxelShape EAST_SHAPE
public static final VoxelShape SOUTH_SHAPE
protected LecternBlock(AbstractBlock.Settings settings)
public BlockRenderType getRenderType(BlockState state)
getRenderType in class BlockWithEntitypublic VoxelShape getCullingShape(BlockState state, BlockView world, BlockPos pos)
getCullingShape in class AbstractBlockpublic boolean hasSidedTransparency(BlockState state)
hasSidedTransparency in class AbstractBlockpublic BlockState getPlacementState(ItemPlacementContext ctx)
getPlacementState in class Blockpublic VoxelShape getCollisionShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)
getCollisionShape in class AbstractBlockpublic VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)
getOutlineShape in class AbstractBlockpublic BlockState rotate(BlockState state, BlockRotation rotation)
By default, this returns the provided block state.
rotate in class AbstractBlockpublic BlockState mirror(BlockState state, BlockMirror mirror)
mirror in class AbstractBlockprotected void appendProperties(StateManager.Builder<Block,BlockState> builder)
appendProperties in class Block@Nullable public BlockEntity createBlockEntity(BlockView world)
public static boolean putBookIfAbsent(World world, BlockPos pos, BlockState state, ItemStack book)
private static void putBook(World world, BlockPos pos, BlockState state, ItemStack book)
public static void setHasBook(World world, BlockPos pos, BlockState state, boolean hasBook)
public static void setPowered(World world, BlockPos pos, BlockState state)
private static void setPowered(World world, BlockPos pos, BlockState state, boolean powered)
private static void updateNeighborAlways(World world, BlockPos pos, BlockState state)
public void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random)
scheduledTick in class AbstractBlockpublic void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved)
WorldChunk.setBlockState(BlockPos, BlockState, boolean) if newState is different from state. Vanilla blocks perform removal cleanups here.onStateReplaced in class AbstractBlockprivate void dropBook(BlockState state, World world, BlockPos pos)
public boolean emitsRedstonePower(BlockState state)
emitsRedstonePower in class AbstractBlockpublic int getWeakRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction)
getWeakRedstonePower in class AbstractBlockpublic int getStrongRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction)
getStrongRedstonePower in class AbstractBlockpublic boolean hasComparatorOutput(BlockState state)
hasComparatorOutput in class AbstractBlockpublic int getComparatorOutput(BlockState state, World world, BlockPos pos)
getComparatorOutput in class AbstractBlockpublic 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 BlockWithEntityprivate void openScreen(World world, BlockPos pos, PlayerEntity player)
public boolean canPathfindThrough(BlockState state, BlockView world, BlockPos pos, NavigationType type)
canPathfindThrough in class AbstractBlock