public class BeehiveBlock extends BlockWithEntity
Block.NeighborGroupAbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>| Modifier and Type | Field and Description |
|---|---|
static DirectionProperty |
FACING |
private static Direction[] |
GENERATE_DIRECTIONS |
static IntProperty |
HONEY_LEVEL |
LOGGER, STATE_IDS, stateManagercollidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier| Constructor and Description |
|---|
BeehiveBlock(AbstractBlock.Settings settings) |
createScreenHandlerFactory, onSyncedBlockEventaddStacksForDisplay, 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, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, pushEntitiesUpBeforeBlockChange, rainTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toStringcalcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canPlaceAt, canReplace, emitsRedstonePower, getAmbientOcclusionLightLevel, getCollisionShape, getCullingShape, getDefaultMaterialColor, getFluidState, getLootTableId, getOffsetType, getOpacity, getOutlineShape, getPistonBehavior, getRaycastShape, getRenderingSeed, getSidesShape, getStrongRedstonePower, getVisualShape, getWeakRedstonePower, hasBlockEntity, hasSidedTransparency, isSideInvisible, mirror, neighborUpdate, onBlockAdded, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onStateReplaced, prepare, randomTick, rotate, scheduledTickprivate static final Direction[] GENERATE_DIRECTIONS
public static final DirectionProperty FACING
public static final IntProperty HONEY_LEVEL
public BeehiveBlock(AbstractBlock.Settings settings)
public boolean hasComparatorOutput(BlockState state)
hasComparatorOutput in class AbstractBlockpublic int getComparatorOutput(BlockState state, World world, BlockPos pos)
getComparatorOutput in class AbstractBlockpublic void afterBreak(World world, PlayerEntity player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, ItemStack stack)
afterBreak in class Blockpublic 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 AbstractBlockpublic void takeHoney(World world, BlockState state, BlockPos pos, @Nullable PlayerEntity player, BeehiveBlockEntity.BeeState beeState)
public void takeHoney(World world, BlockState state, BlockPos pos)
@Environment(value=CLIENT) public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random random)
randomDisplayTick in class Block@Environment(value=CLIENT) private void spawnHoneyParticles(World world, BlockPos pos, BlockState state)
@Environment(value=CLIENT) private void addHoneyParticle(World world, BlockPos pos, VoxelShape shape, double height)
@Environment(value=CLIENT) private void addHoneyParticle(World world, double minX, double maxX, double minZ, double maxZ, double height)
public BlockState getPlacementState(ItemPlacementContext ctx)
getPlacementState in class Blockprotected void appendProperties(StateManager.Builder<Block,BlockState> builder)
appendProperties in class Blockpublic BlockRenderType getRenderType(BlockState state)
getRenderType in class BlockWithEntity@Nullable public BlockEntity createBlockEntity(BlockView world)
public void onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player)
public List<ItemStack> getDroppedStacks(BlockState state, LootContext.Builder builder)
getDroppedStacks in class AbstractBlockpublic BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom)
getStateForNeighborUpdate in class AbstractBlock