public class ShulkerBoxBlock extends BlockWithEntity
Block.NeighborGroup
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>
Modifier and Type | Field and Description |
---|---|
private DyeColor |
color |
static Identifier |
CONTENTS |
static EnumProperty<Direction> |
FACING |
LOGGER, STATE_IDS, stateManager
collidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier
Constructor and Description |
---|
ShulkerBoxBlock(DyeColor color,
AbstractBlock.Settings settings) |
createScreenHandlerFactory, onSyncedBlockEvent
addStacksForDisplay, afterBreak, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getRawIdFromState, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, is, isFaceFullSquare, isIn, isShapeFullCube, isTranslucent, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onSteppedOn, postProcessState, pushEntitiesUpBeforeBlockChange, rainTick, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toString
calcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canPlaceAt, canReplace, emitsRedstonePower, getAmbientOcclusionLightLevel, getCollisionShape, getCullingShape, getDefaultMaterialColor, getFluidState, getLootTableId, getOffsetType, getOpacity, getRaycastShape, getRenderingSeed, getSidesShape, getStateForNeighborUpdate, getStrongRedstonePower, getVisualShape, getWeakRedstonePower, hasBlockEntity, hasSidedTransparency, isSideInvisible, neighborUpdate, onBlockAdded, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, prepare, randomTick, scheduledTick
public static final EnumProperty<Direction> FACING
public static final Identifier CONTENTS
public ShulkerBoxBlock(@Nullable DyeColor color, AbstractBlock.Settings settings)
public BlockEntity createBlockEntity(BlockView world)
public BlockRenderType getRenderType(BlockState state)
getRenderType
in class BlockWithEntity
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
public BlockState getPlacementState(ItemPlacementContext ctx)
getPlacementState
in class Block
protected void appendProperties(StateManager.Builder<Block,BlockState> builder)
appendProperties
in class Block
public void onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player)
public List<ItemStack> getDroppedStacks(BlockState state, LootContext.Builder builder)
getDroppedStacks
in class AbstractBlock
public void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack)
public 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 AbstractBlock
@Environment(value=CLIENT) public void appendTooltip(ItemStack stack, @Nullable BlockView world, List<Text> tooltip, TooltipContext options)
appendTooltip
in class Block
public PistonBehavior getPistonBehavior(BlockState state)
getPistonBehavior
in class AbstractBlock
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)
getOutlineShape
in class AbstractBlock
public boolean hasComparatorOutput(BlockState state)
hasComparatorOutput
in class AbstractBlock
public int getComparatorOutput(BlockState state, World world, BlockPos pos)
getComparatorOutput
in class AbstractBlock
@Environment(value=CLIENT) public ItemStack getPickStack(BlockView world, BlockPos pos, BlockState state)
getPickStack
in class Block
public BlockState rotate(BlockState state, BlockRotation rotation)
By default, this returns the provided block state.
rotate
in class AbstractBlock
public BlockState mirror(BlockState state, BlockMirror mirror)
mirror
in class AbstractBlock