Interface IForgeFluidState
- All Known Implementing Classes:
FluidState
public interface IForgeFluidState
-
Method Summary
Modifier and TypeMethodDescriptiondefault float
getExplosionResistance(BlockGetter world, BlockPos pos, Explosion explosion)
Location sensitive version of getExplosionResistancedefault boolean
isEntityInside(LevelReader world, BlockPos pos, Entity entity, double yToTest, SetTag<Fluid> tag, boolean testingHead)
Called when the entity is inside this block, may be used to determined if the entity can breathing, display material overlays, or if the entity can swim inside a block.private FluidState
self()
-
Method Details
-
self
-
isEntityInside
default boolean isEntityInside(LevelReader world, BlockPos pos, Entity entity, double yToTest, SetTag<Fluid> tag, boolean testingHead)Called when the entity is inside this block, may be used to determined if the entity can breathing, display material overlays, or if the entity can swim inside a block.- Parameters:
world
- that is being tested.pos
- position thats being tested.entity
- that is being tested.yToTest
- , primarily for testingHead, which sends the the eye level of the entity, other wise it sends a y that can be tested vs liquid height.tag
- to test for.testingHead
- when true, its testing the entities head for vision, breathing ect... otherwise its testing the body, for swimming and movement adjustment.
-
getExplosionResistance
Location sensitive version of getExplosionResistance- Parameters:
world
- The current worldpos
- Block position in worldexplosion
- The explosion- Returns:
- The amount of the explosion absorbed.
-