Interface FluidReaction

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface FluidReaction
What happens when a placed fluid flows into another fluid (or plain water): stop, replace it, turn into a block … Made by a FluidReactionType from a definition, or written in code. Runs on the block's thread.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final FluidReaction
    Both stop where they meet: the default.
  • Method Summary

    Modifier and Type
    Method
    Description
    react(@NotNull org.bukkit.block.Block at, @NotNull FluidType incoming, @NotNull ResourceType present)
     
  • Field Details

    • STOP

      static final FluidReaction STOP
      Both stop where they meet: the default.
  • Method Details

    • react

      @NotNull @NotNull FluidReaction.Outcome react(@NotNull @NotNull org.bukkit.block.Block at, @NotNull @NotNull FluidType incoming, @NotNull @NotNull ResourceType present)
      Parameters:
      at - the block the fluid would flow into
      incoming - the fluid flowing in
      present - the fluid already there (Fluids.water() for plain water)
      Returns:
      whether the incoming fluid still flows into the block