public abstract class FlowableFluid extends Fluid
Modifier and Type | Field and Description |
---|---|
static BooleanProperty |
FALLING |
private static ThreadLocal<it.unimi.dsi.fastutil.objects.Object2ByteLinkedOpenHashMap<Block.NeighborGroup>> |
field_15901 |
static IntProperty |
LEVEL |
private Map<FluidState,VoxelShape> |
shapeCache |
STATE_IDS, stateManager
Constructor and Description |
---|
FlowableFluid() |
Modifier and Type | Method and Description |
---|---|
protected void |
appendProperties(StateManager.Builder<Fluid,FluidState> builder) |
protected abstract void |
beforeBreakingBlock(WorldAccess world,
BlockPos pos,
BlockState state) |
private boolean |
canFill(BlockView world,
BlockPos pos,
BlockState state,
Fluid fluid) |
protected boolean |
canFlow(BlockView world,
BlockPos fluidPos,
BlockState fluidBlockState,
Direction flowDirection,
BlockPos flowTo,
BlockState flowToBlockState,
FluidState fluidState,
Fluid fluid) |
private boolean |
canFlowThrough(BlockView world,
Fluid fluid,
BlockPos pos,
BlockState state,
Direction face,
BlockPos fromPos,
BlockState fromState,
FluidState fluidState) |
protected void |
flow(WorldAccess world,
BlockPos pos,
BlockState state,
Direction direction,
FluidState fluidState) |
abstract Fluid |
getFlowing() |
FluidState |
getFlowing(int level,
boolean falling) |
protected abstract int |
getFlowSpeed(WorldView world) |
float |
getHeight(FluidState state) |
float |
getHeight(FluidState state,
BlockView world,
BlockPos pos) |
protected abstract int |
getLevelDecreasePerBlock(WorldView world) |
protected int |
getNextTickDelay(World world,
BlockPos pos,
FluidState oldState,
FluidState newState) |
VoxelShape |
getShape(FluidState state,
BlockView world,
BlockPos pos) |
protected Map<Direction,FluidState> |
getSpread(WorldView world,
BlockPos pos,
BlockState state) |
abstract Fluid |
getStill() |
FluidState |
getStill(boolean falling) |
protected FluidState |
getUpdatedState(WorldView world,
BlockPos pos,
BlockState state) |
Vec3d |
getVelocity(BlockView world,
BlockPos pos,
FluidState state) |
private static boolean |
isFluidAboveEqual(FluidState state,
BlockView world,
BlockPos pos) |
protected abstract boolean |
isInfinite() |
private boolean |
isMatchingAndStill(FluidState state) |
private boolean |
method_15736(BlockView world,
Fluid fluid,
BlockPos pos,
BlockState state,
BlockPos fromPos,
BlockState fromState) |
private int |
method_15740(WorldView world,
BlockPos pos) |
protected static int |
method_15741(FluidState state) |
protected int |
method_15742(WorldView world,
BlockPos blockPos,
int int2,
Direction direction,
BlockState blockState,
BlockPos blockPos2,
it.unimi.dsi.fastutil.shorts.Short2ObjectMap<com.mojang.datafixers.util.Pair<BlockState,FluidState>> short2ObjectMap,
it.unimi.dsi.fastutil.shorts.Short2BooleanMap short2BooleanMap) |
private void |
method_15744(WorldAccess world,
BlockPos pos,
FluidState fluidState,
BlockState blockState) |
private static short |
method_15747(BlockPos blockPos,
BlockPos blockPos2) |
private boolean |
method_15748(FluidState state) |
protected boolean |
method_15749(BlockView world,
BlockPos pos,
Direction direction) |
void |
onScheduledTick(World world,
BlockPos pos,
FluidState state) |
private boolean |
receivesFlow(Direction face,
BlockView world,
BlockPos pos,
BlockState state,
BlockPos fromPos,
BlockState fromState) |
protected void |
tryFlow(WorldAccess world,
BlockPos fluidPos,
FluidState state) |
canBeReplacedWith, getBlastResistance, getBucketItem, getDefaultState, getLevel, getParticle, getStateManager, getTickRate, hasRandomTicks, isEmpty, isIn, isStill, matchesType, onRandomTick, randomDisplayTick, setDefaultState, toBlockState
public static final BooleanProperty FALLING
public static final IntProperty LEVEL
private static final ThreadLocal<it.unimi.dsi.fastutil.objects.Object2ByteLinkedOpenHashMap<Block.NeighborGroup>> field_15901
private final Map<FluidState,VoxelShape> shapeCache
protected void appendProperties(StateManager.Builder<Fluid,FluidState> builder)
appendProperties
in class Fluid
public Vec3d getVelocity(BlockView world, BlockPos pos, FluidState state)
getVelocity
in class Fluid
private boolean method_15748(FluidState state)
protected void tryFlow(WorldAccess world, BlockPos fluidPos, FluidState state)
private void method_15744(WorldAccess world, BlockPos pos, FluidState fluidState, BlockState blockState)
protected FluidState getUpdatedState(WorldView world, BlockPos pos, BlockState state)
private boolean receivesFlow(Direction face, BlockView world, BlockPos pos, BlockState state, BlockPos fromPos, BlockState fromState)
public abstract Fluid getFlowing()
public FluidState getFlowing(int level, boolean falling)
public abstract Fluid getStill()
public FluidState getStill(boolean falling)
protected abstract boolean isInfinite()
protected void flow(WorldAccess world, BlockPos pos, BlockState state, Direction direction, FluidState fluidState)
protected abstract void beforeBreakingBlock(WorldAccess world, BlockPos pos, BlockState state)
protected int method_15742(WorldView world, BlockPos blockPos, int int2, Direction direction, BlockState blockState, BlockPos blockPos2, it.unimi.dsi.fastutil.shorts.Short2ObjectMap<com.mojang.datafixers.util.Pair<BlockState,FluidState>> short2ObjectMap, it.unimi.dsi.fastutil.shorts.Short2BooleanMap short2BooleanMap)
private boolean method_15736(BlockView world, Fluid fluid, BlockPos pos, BlockState state, BlockPos fromPos, BlockState fromState)
private boolean canFlowThrough(BlockView world, Fluid fluid, BlockPos pos, BlockState state, Direction face, BlockPos fromPos, BlockState fromState, FluidState fluidState)
private boolean isMatchingAndStill(FluidState state)
protected abstract int getFlowSpeed(WorldView world)
protected Map<Direction,FluidState> getSpread(WorldView world, BlockPos pos, BlockState state)
private boolean canFill(BlockView world, BlockPos pos, BlockState state, Fluid fluid)
protected boolean canFlow(BlockView world, BlockPos fluidPos, BlockState fluidBlockState, Direction flowDirection, BlockPos flowTo, BlockState flowToBlockState, FluidState fluidState, Fluid fluid)
protected abstract int getLevelDecreasePerBlock(WorldView world)
protected int getNextTickDelay(World world, BlockPos pos, FluidState oldState, FluidState newState)
public void onScheduledTick(World world, BlockPos pos, FluidState state)
onScheduledTick
in class Fluid
protected static int method_15741(FluidState state)
private static boolean isFluidAboveEqual(FluidState state, BlockView world, BlockPos pos)
public float getHeight(FluidState state, BlockView world, BlockPos pos)
public float getHeight(FluidState state)
public VoxelShape getShape(FluidState state, BlockView world, BlockPos pos)