Package net.minecraft.block
Class AbstractCauldronBlock
java.lang.Object
net.minecraft.block.AbstractBlock
net.minecraft.block.Block
net.minecraft.block.AbstractCauldronBlock
- All Implemented Interfaces:
ItemConvertible
- Direct Known Subclasses:
CauldronBlock,LavaCauldronBlock,LeveledCauldronBlock
public abstract class AbstractCauldronBlock extends Block
-
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 private Map<Item,CauldronBehavior>behaviorMapprotected static VoxelShapeOUTLINE_SHAPEprivate static VoxelShapeRAY_TRACE_SHAPEFields 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 AbstractCauldronBlock(AbstractBlock.Settings settings, Map<Item,CauldronBehavior> behaviorMap) -
Method Summary
Modifier and Type Method Description protected booleancanBeFilledByDripstone(Fluid fluid)booleancanPathfindThrough(BlockState state, BlockView world, BlockPos pos, NavigationType type)protected voidfillFromDripstone(BlockState state, World world, BlockPos pos, Fluid fluid)protected doublegetFluidHeight(BlockState state)VoxelShapegetOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)VoxelShapegetRaycastShape(BlockState state, BlockView world, BlockPos pos)booleanhasComparatorOutput(BlockState state)protected booleanisEntityTouchingFluid(BlockState state, BlockPos pos, Entity entity)ActionResultonUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit)Called when this block is used by a player.voidscheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random)Methods inherited from class net.minecraft.block.Block
addStacksForDisplay, afterBreak, appendProperties, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getPlacementState, getRawIdFromState, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, isFaceFullSquare, isShapeFullCube, isTranslucent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toStringMethods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPlaceAt, canReplace, createScreenHandlerFactory, emitsRedstonePower, getAmbientOcclusionLightLevel, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getFluidState, getLootTableId, getMaxModelOffset, getOffsetType, getOpacity, getPistonBehavior, getRenderingSeed, getRenderType, getSidesShape, getStateForNeighborUpdate, getStrongRedstonePower, getVisualShape, getWeakRedstonePower, hasSidedTransparency, isSideInvisible, mirror, neighborUpdate, onBlockAdded, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onStateReplaced, onSyncedBlockEvent, prepare, randomTick, rotate
-
Field Details
-
RAY_TRACE_SHAPE
-
OUTLINE_SHAPE
-
behaviorMap
-
-
Constructor Details
-
AbstractCauldronBlock
public AbstractCauldronBlock(AbstractBlock.Settings settings, Map<Item,CauldronBehavior> behaviorMap)
-
-
Method Details
-
getFluidHeight
-
isEntityTouchingFluid
-
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.
-
getOutlineShape
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)- Overrides:
getOutlineShapein classAbstractBlock
-
getRaycastShape
- Overrides:
getRaycastShapein classAbstractBlock
-
hasComparatorOutput
- Overrides:
hasComparatorOutputin classAbstractBlock
-
scheduledTick
- Overrides:
scheduledTickin classAbstractBlock
-
canBeFilledByDripstone
-
fillFromDripstone
-