Interface IForgeFluidState
- All Known Implementing Classes:
FluidState
public interface IForgeFluidState
-
Method Summary
Modifier and TypeMethodDescriptiondefault floatgetExplosionResistance(BlockGetter level, BlockPos pos, Explosion explosion) Location sensitive version of getExplosionResistancedefault booleanisEntityInside(LevelReader level, BlockPos pos, Entity entity, double yToTest, HolderSet<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 FluidStateself()
-
Method Details
-
self
-
isEntityInside
default boolean isEntityInside(LevelReader level, BlockPos pos, Entity entity, double yToTest, HolderSet<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:
level- 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:
level- The current levelpos- Block position in levelexplosion- The explosion- Returns:
- The amount of the explosion absorbed.
-