Struct FluidTypeProperties
pub struct FluidTypeProperties {
pub description_id: String,
pub light_level: u8,
pub fall_distance_modifier: f32,
pub can_push_entity: bool,
pub can_swim: bool,
pub can_drown: bool,
pub can_extinguish: bool,
pub can_hydrate: bool,
pub supports_boating: bool,
pub explosion_resistance: f32,
pub randomly_ticks: bool,
pub drip_particle: Option<String>,
}Expand description
What a registered fluid is, apart from any level or entity. Vanilla reads the entity
behaviours off FluidTags.WATER and FluidTags.LAVA, so minecraft:flowing_water answers as
minecraft:water. The empty fluid and a tank-only fluid emit no light, nothing can be done in
them, their fall modifier scales nothing and they drip nothing and never tick randomly.
Fields§
§description_id: StringFluidType.getDescriptionId: fluid_type.<mod>.<name>, vanilla’s by its block
(block.minecraft.water, block.minecraft.air for the empty fluid).
light_level: u8FluidType.getLightLevel: what the fluid’s block emits, 0 through 15.
fall_distance_modifier: f32FluidType.getFallDistanceModifier: what an entity’s fall distance is multiplied by
each tick in the fluid: water’s 0 resets it, lava’s 0.5 halves it.
can_push_entity: boolFluidType.canPushEntity: whether its current moves entities.
can_swim: boolFluidType.canSwim: whether a sprinting entity swims in it.
can_drown: boolFluidType.canDrownIn: whether an entity’s air runs out with its eyes in it.
can_extinguish: boolFluidType.canExtinguish: whether it puts out a burning entity.
can_hydrate: boolFluidType.canHydrate: whether it keeps farmland wet.
supports_boating: boolFluidType.supportsBoating: whether a boat floats on it.
explosion_resistance: f32Fluid.getExplosionResistance: how much of an explosion’s power the fluid soaks up per
block, 100 for water, lava and a mod’s world fluid, 0 for the empty fluid and a
tank-only fluid. A flowing form answers as its source.
randomly_ticks: boolFluid.isRandomlyTicking: whether the fluid takes random ticks, which only lava does.
drip_particle: Option<String>Fluid.getDripParticle: the particle id a block of the fluid drips beneath it
(minecraft:dripping_water, minecraft:dripping_lava), none for any other fluid.
Trait Implementations§
§impl Clone for FluidTypeProperties
impl Clone for FluidTypeProperties
§fn clone(&self) -> FluidTypeProperties
fn clone(&self) -> FluidTypeProperties
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more