public class CandleBlock extends AbstractCandleBlock implements Waterloggable
Block.NeighborGroupAbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>| Modifier and Type | Field and Description |
|---|---|
static IntProperty |
CANDLES |
private static it.unimi.dsi.fastutil.ints.Int2ObjectMap<List<Vec3d>> |
CANDLES_TO_PARTICLE_OFFSETS |
private static VoxelShape |
FOUR_CANDLES_SHAPE |
static BooleanProperty |
LIT |
private static VoxelShape |
ONE_CANDLE_SHAPE |
static ToIntFunction<BlockState> |
STATE_TO_LUMINANCE |
private static VoxelShape |
THREE_CANDLES_SHAPE |
private static VoxelShape |
TWO_CANDLES_SHAPE |
static BooleanProperty |
WATERLOGGED |
LOGGER, STATE_IDS, stateManagercollidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier| Constructor and Description |
|---|
CandleBlock(AbstractBlock.Settings settings) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendProperties(StateManager.Builder<Block,BlockState> builder) |
static boolean |
canBeLit(BlockState state) |
boolean |
canReplace(BlockState state,
ItemPlacementContext context) |
FluidState |
getFluidState(BlockState state) |
VoxelShape |
getOutlineShape(BlockState state,
BlockView world,
BlockPos pos,
ShapeContext context) |
protected Iterable<Vec3d> |
getParticleOffsets(BlockState state) |
BlockState |
getPlacementState(ItemPlacementContext ctx) |
BlockState |
getStateForNeighborUpdate(BlockState state,
Direction direction,
BlockState newState,
WorldAccess world,
BlockPos pos,
BlockPos posFrom) |
ActionResult |
onUse(BlockState state,
World world,
BlockPos pos,
PlayerEntity player,
Hand hand,
BlockHitResult hit)
Called when this block is used by a player.
|
boolean |
tryFillWithFluid(WorldAccess world,
BlockPos pos,
BlockState state,
FluidState fluidState) |
extinguish, onProjectileHit, randomDisplayTickaddStacksForDisplay, 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, isFaceFullSquare, isShapeFullCube, isTranslucent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, pushEntitiesUpBeforeBlockChange, rainTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toStringcalcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canPlaceAt, createScreenHandlerFactory, emitsRedstonePower, getAmbientOcclusionLightLevel, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getLootTableId, getOffsetType, getOpacity, getPistonBehavior, getRaycastShape, getRenderingSeed, getRenderType, getSidesShape, getStrongRedstonePower, getVisualShape, getWeakRedstonePower, hasComparatorOutput, hasSidedTransparency, isSideInvisible, mirror, neighborUpdate, onBlockAdded, onBlockBreakStart, onEntityCollision, onStacksDropped, onStateReplaced, onSyncedBlockEvent, prepare, randomTick, rotate, scheduledTickclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcanFillWithFluid, tryDrainFluidpublic static final IntProperty CANDLES
public static final BooleanProperty LIT
public static final BooleanProperty WATERLOGGED
public static final ToIntFunction<BlockState> STATE_TO_LUMINANCE
private static final it.unimi.dsi.fastutil.ints.Int2ObjectMap<List<Vec3d>> CANDLES_TO_PARTICLE_OFFSETS
private static final VoxelShape ONE_CANDLE_SHAPE
private static final VoxelShape TWO_CANDLES_SHAPE
private static final VoxelShape THREE_CANDLES_SHAPE
private static final VoxelShape FOUR_CANDLES_SHAPE
public CandleBlock(AbstractBlock.Settings settings)
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 AbstractBlockpublic boolean canReplace(BlockState state, ItemPlacementContext context)
canReplace in class AbstractBlockpublic BlockState getPlacementState(ItemPlacementContext ctx)
getPlacementState in class Blockpublic BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom)
getStateForNeighborUpdate in class AbstractBlockpublic FluidState getFluidState(BlockState state)
getFluidState in class AbstractBlockpublic VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)
getOutlineShape in class AbstractBlockprotected void appendProperties(StateManager.Builder<Block,BlockState> builder)
appendProperties in class Blockpublic boolean tryFillWithFluid(WorldAccess world, BlockPos pos, BlockState state, FluidState fluidState)
tryFillWithFluid in interface FluidFillabletryFillWithFluid in interface Waterloggablepublic static boolean canBeLit(BlockState state)
@Environment(value=CLIENT) protected Iterable<Vec3d> getParticleOffsets(BlockState state)
getParticleOffsets in class AbstractCandleBlock