类 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.

  • 字段详细资料

  • 构造器详细资料

  • 方法详细资料

    • getLevel

      public ServerLevel getLevel()
      返回 the server level this event is affecting。
      返回:
      the server level this event is affecting
    • getCustomSpawners

      public List<CustomSpawner> getCustomSpawners()
      返回:
      the modifiable custom spawner list.
    • addCustomSpawner

      public void addCustomSpawner(CustomSpawner customSpawner)
      Adds a custom spawner to the list.