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 |
|---|---|
protected BaseFluid |
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(BaseFluid fluid,
AbstractBlock.Settings settings) |
addStacksForDisplay, afterBreak, asBlock, asItem, buildTooltip, 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, isFaceFullSquare, isIn, isShapeFullCube, isSideSolidFullSquare, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, pushEntitiesUpBeforeBlockChange, rainTick, randomDisplayTick, replaceBlock, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toStringcalcBlockBreakingDelta, canBucketPlace, canPlaceAt, canReplace, createScreenHandlerFactory, emitsRedstonePower, getAmbientOcclusionLightLevel, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMaterialColor, getLootTableId, getOffsetType, getOpacity, getPistonBehavior, getRayTraceShape, getRenderingSeed, getSidesShape, getStrongRedstonePower, getVisualShape, getWeakRedstonePower, hasBlockEntity, hasComparatorOutput, hasSidedTransparency, mirror, onBlockAction, onBlockBreakStart, onBlockRemoved, onProjectileHit, onStacksDropped, onUse, prepare, rotate, scheduledTickpublic static final IntProperty LEVEL
protected final BaseFluid fluid
private final List<FluidState> statesByLevel
protected FluidBlock(BaseFluid fluid, AbstractBlock.Settings settings)
public 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, IWorld 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)
protected void appendProperties(StateManager.Builder<Block,BlockState> builder)
appendProperties in class Blockpublic Fluid tryDrainFluid(IWorld world, BlockPos pos, BlockState state)
tryDrainFluid in interface FluidDrainablepublic void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity)
onEntityCollision in class AbstractBlock