类 CreateFluidSourceEvent

java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.level.BlockEvent
net.neoforged.neoforge.event.level.block.CreateFluidSourceEvent

public class CreateFluidSourceEvent extends BlockEvent
Fired when a fluid checks if nearby blocks can convert it to a source block.

This can be used to manipulate if fluids are allowed to create sources dynamically.

  • 字段详细资料

    • vanillaResult

      private final boolean vanillaResult
    • canConvert

      private boolean canConvert
  • 构造器详细资料

  • 方法详细资料

    • getLevel

      public ServerLevel getLevel()
      覆盖:
      getLevel 在类中 BlockEvent
    • getFluidState

      public FluidState getFluidState()
    • getVanillaResult

      public boolean getVanillaResult()
      Returns if the fluid would normally be converted to a source block.

      This is computed by calling IFluidStateExtension.canConvertToSource(ServerLevel, BlockPos).

    • canConvert

      public boolean canConvert()
      返回 if the fluid will be converted to a source block。
      返回:
      if the fluid will be converted to a source block
    • setCanConvert

      public void setCanConvert(boolean convert)
      Sets if the fluid will be converted to a source block.
      参数:
      convert - True to permit the conversion, false otherwise.