Interface IForgeFluidState

All Known Implementing Classes:
FluidState

public interface IForgeFluidState
  • Method Summary

    Modifier and Type
    Method
    Description
    default float
    Location sensitive version of getExplosionResistance
    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.
    private FluidState
     
  • Method Details

    • self

      private FluidState 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

      default float getExplosionResistance(BlockGetter world, BlockPos pos, Explosion explosion)
      Location sensitive version of getExplosionResistance
      Parameters:
      world - The current world
      pos - Block position in world
      explosion - The explosion
      Returns:
      The amount of the explosion absorbed.