类 CreateFluidSourceEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.level.BlockEvent
net.neoforged.neoforge.event.level.block.CreateFluidSourceEvent
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.
-
嵌套类概要
从类继承的嵌套类/接口 net.neoforged.neoforge.event.level.BlockEvent
BlockEvent.BlockToolModificationEvent, BlockEvent.BreakEvent, BlockEvent.EntityMultiPlaceEvent, BlockEvent.EntityPlaceEvent, BlockEvent.FarmlandTrampleEvent, BlockEvent.FluidPlaceBlockEvent, BlockEvent.NeighborNotifyEvent, BlockEvent.PortalSpawnEvent
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明boolean
返回 if the fluid will be converted to a source block。getLevel()
boolean
Returns if the fluid would normally be converted to a source block.void
setCanConvert
(boolean convert) Sets if the fluid will be converted to a source block.从类继承的方法 net.neoforged.neoforge.event.level.BlockEvent
getPos, getState
-
字段详细资料
-
vanillaResult
private final boolean vanillaResult -
canConvert
private boolean canConvert
-
-
构造器详细资料
-
CreateFluidSourceEvent
-
-
方法详细资料
-
getLevel
- 覆盖:
getLevel
在类中BlockEvent
-
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.
-