Package net.minecraft.block
Class CandleBlock
java.lang.Object
net.minecraft.block.AbstractBlock
net.minecraft.block.Block
net.minecraft.block.AbstractCandleBlock
net.minecraft.block.CandleBlock
- All Implemented Interfaces:
FluidDrainable,FluidFillable,Waterloggable,ItemConvertible
public class CandleBlock extends AbstractCandleBlock implements Waterloggable
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.NeighborGroupNested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A> -
Field Summary
Fields Modifier and Type Field Description static IntPropertyCANDLESprivate static Int2ObjectMap<List<Vec3d>>CANDLES_TO_PARTICLE_OFFSETSprivate static VoxelShapeFOUR_CANDLES_SHAPEstatic BooleanPropertyLITprivate static VoxelShapeONE_CANDLE_SHAPEstatic ToIntFunction<BlockState>STATE_TO_LUMINANCEprivate static VoxelShapeTHREE_CANDLES_SHAPEprivate static VoxelShapeTWO_CANDLES_SHAPEstatic BooleanPropertyWATERLOGGEDFields inherited from class net.minecraft.block.Block
LOGGER, STATE_IDS, stateManagerFields inherited from class net.minecraft.block.AbstractBlock
collidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier -
Constructor Summary
Constructors Constructor Description CandleBlock(AbstractBlock.Settings settings) -
Method Summary
Modifier and Type Method Description protected voidappendProperties(StateManager.Builder<Block,BlockState> builder)static booleancanBeLit(BlockState state)booleancanPlaceAt(BlockState state, WorldView world, BlockPos pos)booleancanReplace(BlockState state, ItemPlacementContext context)FluidStategetFluidState(BlockState state)VoxelShapegetOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)protected Iterable<Vec3d>getParticleOffsets(BlockState state)BlockStategetPlacementState(ItemPlacementContext ctx)BlockStategetStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom)ActionResultonUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit)Called when this block is used by a player.booleantryFillWithFluid(WorldAccess world, BlockPos pos, BlockState state, FluidState fluidState)Methods inherited from class net.minecraft.block.AbstractCandleBlock
extinguish, onProjectileHit, randomDisplayTickMethods inherited from class net.minecraft.block.Block
addStacksForDisplay, 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, precipitationTick, pushEntitiesUpBeforeBlockChange, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toStringMethods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPathfindThrough, createScreenHandlerFactory, emitsRedstonePower, getAmbientOcclusionLightLevel, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getLootTableId, getMaxModelOffset, getOffsetType, getOpacity, getPistonBehavior, getRaycastShape, getRenderingSeed, getRenderType, getSidesShape, getStrongRedstonePower, getVisualShape, getWeakRedstonePower, hasComparatorOutput, hasSidedTransparency, isSideInvisible, mirror, neighborUpdate, onBlockAdded, onBlockBreakStart, onEntityCollision, onStacksDropped, onStateReplaced, onSyncedBlockEvent, prepare, randomTick, rotate, scheduledTickMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.block.Waterloggable
canFillWithFluid, getDrainSound, tryDrainFluid
-
Field Details
-
CANDLES
-
LIT
-
WATERLOGGED
-
STATE_TO_LUMINANCE
-
CANDLES_TO_PARTICLE_OFFSETS
-
ONE_CANDLE_SHAPE
-
TWO_CANDLES_SHAPE
-
THREE_CANDLES_SHAPE
-
FOUR_CANDLES_SHAPE
-
-
Constructor Details
-
CandleBlock
-
-
Method Details
-
onUse
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit)Called when this block is used by a player. This, by default, is bound to using the right mouse button.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.
- Overrides:
onUsein classAbstractBlock- Returns:
- an action result that specifies if using the block was successful.
-
canReplace
- Overrides:
canReplacein classAbstractBlock
-
getPlacementState
- Overrides:
getPlacementStatein classBlock
-
getStateForNeighborUpdate
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom)- Overrides:
getStateForNeighborUpdatein classAbstractBlock
-
getFluidState
- Overrides:
getFluidStatein classAbstractBlock
-
getOutlineShape
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)- Overrides:
getOutlineShapein classAbstractBlock
-
appendProperties
- Overrides:
appendPropertiesin classBlock
-
tryFillWithFluid
public boolean tryFillWithFluid(WorldAccess world, BlockPos pos, BlockState state, FluidState fluidState)- Specified by:
tryFillWithFluidin interfaceFluidFillable- Specified by:
tryFillWithFluidin interfaceWaterloggable
-
canBeLit
-
getParticleOffsets
- Specified by:
getParticleOffsetsin classAbstractCandleBlock
-
canPlaceAt
- Overrides:
canPlaceAtin classAbstractBlock
-