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 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 FluidState
     
  • Method Details

    • self

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

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