类 ModifyCustomSpawnersEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.level.ModifyCustomSpawnersEvent
public class ModifyCustomSpawnersEvent
extends net.neoforged.bus.api.Event
This event is fired on the logical server when a
ServerLevel
is building its custom spawners.
Subscribe to this event to add/remove custom spawners for the level.
This event is not cancellable
and does not have a result.
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
addCustomSpawner
(CustomSpawner customSpawner) Adds a custom spawner to the list.getLevel()
返回 the server level this event is affecting。
-
字段详细资料
-
serverLevel
-
customSpawners
-
-
构造器详细资料
-
ModifyCustomSpawnersEvent
@Internal public ModifyCustomSpawnersEvent(ServerLevel serverLevel, List<CustomSpawner> customSpawners)
-
-
方法详细资料
-
getLevel
返回 the server level this event is affecting。- 返回:
- the server level this event is affecting
-
getCustomSpawners
- 返回:
- the modifiable custom spawner list.
-
addCustomSpawner
Adds a custom spawner to the list.
-