Class BlockEvent.FluidPlaceBlockEvent

Enclosing class:

public static class BlockEvent.FluidPlaceBlockEvent extends BlockEvent
Fired when a liquid places a block. Use setNewState(IBlockState) to change the result of a cobblestone generator or add variants of obsidian. Alternatively, you could execute arbitrary code when lava sets blocks on fire, even preventing it. BlockEvent.getState() will return the block that was originally going to be placed. BlockEvent.getPos() will return the position of the block to be changed.
  • Field Details

  • Constructor Details

  • Method Details

    • getLiquidPos

      public BlockPos getLiquidPos()
      The position of the liquid this event originated from. This may be the same as BlockEvent.getPos().
    • getNewState

      public BlockState getNewState()
      The block state that will be placed after this event resolves.
    • setNewState

      public void setNewState(BlockState state)
    • getOriginalState

      public BlockState getOriginalState()
      The state of the block to be changed before the event was fired.