public class FluidBlock extends Block implements FluidDrainable
Block.NeighborGroupAbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>| Modifier and Type | Field and Description |
|---|---|
static VoxelShape |
COLLISION_SHAPE |
protected FlowableFluid |
fluid |
static IntProperty |
LEVEL |
private List<FluidState> |
statesByLevel |
LOGGER, STATE_IDS, stateManagercollidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier| Modifier | Constructor and Description |
|---|---|
protected |
FluidBlock(FlowableFluid fluid,
AbstractBlock.Settings settings) |
addStacksForDisplay, afterBreak, 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, hasTopRim, is, isFaceFullSquare, isIn, isShapeFullCube, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, pushEntitiesUpBeforeBlockChange, rainTick, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toStringcalcBlockBreakingDelta, canBucketPlace, canPlaceAt, canReplace, createScreenHandlerFactory, emitsRedstonePower, getAmbientOcclusionLightLevel, getComparatorOutput, getCullingShape, getDefaultMaterialColor, getLootTableId, getOffsetType, getOpacity, getPistonBehavior, getRaycastShape, getRenderingSeed, getSidesShape, getStrongRedstonePower, getVisualShape, getWeakRedstonePower, hasBlockEntity, hasComparatorOutput, hasSidedTransparency, mirror, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onStateReplaced, onSyncedBlockEvent, onUse, prepare, rotate, scheduledTickpublic static final IntProperty LEVEL
public static final VoxelShape COLLISION_SHAPE
protected final FlowableFluid fluid
private final List<FluidState> statesByLevel
protected FluidBlock(FlowableFluid fluid, AbstractBlock.Settings settings)
public VoxelShape getCollisionShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)
getCollisionShape in class AbstractBlockpublic boolean hasRandomTicks(BlockState state)
hasRandomTicks in class Blockpublic void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random random)
randomTick in class AbstractBlockpublic boolean isTranslucent(BlockState state, BlockView world, BlockPos pos)
isTranslucent in class Blockpublic boolean canPathfindThrough(BlockState state, BlockView world, BlockPos pos, NavigationType type)
canPathfindThrough in class AbstractBlockpublic FluidState getFluidState(BlockState state)
getFluidState in class AbstractBlock@Environment(value=CLIENT) public boolean isSideInvisible(BlockState state, BlockState stateFrom, Direction direction)
isSideInvisible in class AbstractBlockpublic BlockRenderType getRenderType(BlockState state)
getRenderType in class AbstractBlockpublic List<ItemStack> getDroppedStacks(BlockState state, LootContext.Builder builder)
getDroppedStacks in class AbstractBlockpublic VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)
getOutlineShape in class AbstractBlockpublic void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify)
onBlockAdded in class AbstractBlockpublic BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom)
getStateForNeighborUpdate in class AbstractBlockpublic void neighborUpdate(BlockState state, World world, BlockPos pos, Block block, BlockPos fromPos, boolean notify)
neighborUpdate in class AbstractBlockprivate boolean receiveNeighborFluids(World world, BlockPos pos, BlockState state)
private void playExtinguishSound(WorldAccess world, BlockPos pos)
protected void appendProperties(StateManager.Builder<Block,BlockState> builder)
appendProperties in class Blockpublic Fluid tryDrainFluid(WorldAccess world, BlockPos pos, BlockState state)
tryDrainFluid in interface FluidDrainable