steel_core/fluid/fluids/
empty.rs1use std::sync::Arc;
7
8use steel_registry::blocks::properties::Direction;
9use steel_registry::fluid::FluidRef;
10use steel_registry::vanilla_fluids;
11use steel_utils::types::{BlockPos, BlockStateId};
12
13use crate::fluid::FluidBehavior;
14use crate::fluid::FluidState;
15use crate::world::World;
16
17pub struct EmptyFluid;
19
20impl FluidBehavior for EmptyFluid {
21 fn fluid_type(&self) -> FluidRef {
22 &vanilla_fluids::EMPTY
23 }
24
25 fn tick(
26 &self,
27 _world: &Arc<World>,
28 _pos: BlockPos,
29 _block_state: BlockStateId,
30 _fluid_state: FluidState,
31 ) {
32 }
34
35 fn spread(
36 &self,
37 _world: &Arc<World>,
38 _pos: BlockPos,
39 _block_state: BlockStateId,
40 _fluid_state: FluidState,
41 ) {
42 }
44
45 fn tick_delay(&self, _world: &Arc<World>) -> i32 {
46 0
47 }
48
49 fn drop_off(&self, _world: &Arc<World>) -> u8 {
50 0
51 }
52
53 fn slope_find_distance(&self, _world: &Arc<World>) -> u8 {
54 0
55 }
56
57 fn can_be_replaced_with(
61 &self,
62 _fluid_state: FluidState,
63 _world: &Arc<World>,
64 _pos: BlockPos,
65 _other_fluid: FluidRef,
66 _direction: Direction,
67 ) -> bool {
68 true
70 }
71}