public class FluidBlock extends Block implements FluidDrainable
Block.NeighborGroup
AbstractBlock.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, stateManager
collidable, 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, toString
calcBlockBreakingDelta, 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, scheduledTick
public 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 AbstractBlock
public boolean hasRandomTicks(BlockState state)
hasRandomTicks
in class Block
public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random random)
randomTick
in class AbstractBlock
public boolean isTranslucent(BlockState state, BlockView world, BlockPos pos)
isTranslucent
in class Block
public boolean canPathfindThrough(BlockState state, BlockView world, BlockPos pos, NavigationType type)
canPathfindThrough
in class AbstractBlock
public FluidState getFluidState(BlockState state)
getFluidState
in class AbstractBlock
@Environment(value=CLIENT) public boolean isSideInvisible(BlockState state, BlockState stateFrom, Direction direction)
isSideInvisible
in class AbstractBlock
public BlockRenderType getRenderType(BlockState state)
getRenderType
in class AbstractBlock
public List<ItemStack> getDroppedStacks(BlockState state, LootContext.Builder builder)
getDroppedStacks
in class AbstractBlock
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)
getOutlineShape
in class AbstractBlock
public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify)
onBlockAdded
in class AbstractBlock
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom)
getStateForNeighborUpdate
in class AbstractBlock
public void neighborUpdate(BlockState state, World world, BlockPos pos, Block block, BlockPos fromPos, boolean notify)
neighborUpdate
in class AbstractBlock
private 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 Block
public Fluid tryDrainFluid(WorldAccess world, BlockPos pos, BlockState state)
tryDrainFluid
in interface FluidDrainable