Package net.minecraft.fluid
Class Fluid
java.lang.Object
net.minecraft.fluid.Fluid
- Direct Known Subclasses:
EmptyFluid
,FlowableFluid
public abstract class Fluid extends Object
-
Field Summary
Fields Modifier and Type Field Description private FluidState
defaultState
static IdList<FluidState>
STATE_IDS
protected StateManager<Fluid,FluidState>
stateManager
-
Constructor Summary
Constructors Modifier Constructor Description protected
Fluid()
-
Method Summary
Modifier and Type Method Description protected void
appendProperties(StateManager.Builder<Fluid,FluidState> builder)
protected abstract boolean
canBeReplacedWith(FluidState state, BlockView world, BlockPos pos, Fluid fluid, Direction direction)
protected abstract float
getBlastResistance()
abstract Item
getBucketItem()
FluidState
getDefaultState()
abstract float
getHeight(FluidState state)
abstract float
getHeight(FluidState state, BlockView world, BlockPos pos)
abstract int
getLevel(FluidState state)
protected ParticleEffect
getParticle()
abstract VoxelShape
getShape(FluidState state, BlockView world, BlockPos pos)
StateManager<Fluid,FluidState>
getStateManager()
abstract int
getTickRate(WorldView world)
protected abstract Vec3d
getVelocity(BlockView world, BlockPos pos, FluidState state)
protected boolean
hasRandomTicks()
protected boolean
isEmpty()
boolean
isIn(Tag<Fluid> tag)
abstract boolean
isStill(FluidState state)
boolean
matchesType(Fluid fluid)
protected void
onRandomTick(World world, BlockPos pos, FluidState state, Random random)
protected void
onScheduledTick(World world, BlockPos pos, FluidState state)
protected void
randomDisplayTick(World world, BlockPos pos, FluidState state, Random random)
protected void
setDefaultState(FluidState state)
protected abstract BlockState
toBlockState(FluidState state)
-
Field Details
-
STATE_IDS
-
stateManager
-
defaultState
-
-
Constructor Details
-
Fluid
protected Fluid()
-
-
Method Details
-
appendProperties
-
getStateManager
-
setDefaultState
-
getDefaultState
-
getBucketItem
-
randomDisplayTick
@Environment(CLIENT) protected void randomDisplayTick(World world, BlockPos pos, FluidState state, Random random) -
onScheduledTick
-
onRandomTick
-
getParticle
-
canBeReplacedWith
protected abstract boolean canBeReplacedWith(FluidState state, BlockView world, BlockPos pos, Fluid fluid, Direction direction) -
getVelocity
-
getTickRate
-
hasRandomTicks
protected boolean hasRandomTicks() -
isEmpty
protected boolean isEmpty() -
getBlastResistance
protected abstract float getBlastResistance() -
getHeight
-
getHeight
-
toBlockState
-
isStill
-
getLevel
-
matchesType
-
isIn
-
getShape
-