FinalizeMobSpawnEvent

Link to finalizemobspawnevent

The event is not cancelable.

The event does not have a result.

Importing the class

Link to importing-the-class

Importing the class is recommended for events, simply add this line to the top of your script file.

ZenScript
Copy
import crafttweaker.neoforge.api.event.entity.living.spawn.FinalizeMobSpawnEvent;

Listening to the event

Link to listening-to-the-event

ZenScript
Copy
events.register<crafttweaker.neoforge.api.event.entity.living.spawn.FinalizeMobSpawnEvent>(event => {
    println("FinalizeMobSpawnEvent ran!");
});

FinalizeMobSpawnEvent extends MobSpawnEvent. That means all methods available in MobSpawnEvent are also available in FinalizeMobSpawnEvent

Implemented Interfaces

Link to implemented-interfaces

FinalizeMobSpawnEvent implements the following interfaces. That means all methods defined in these interfaces are also available in FinalizeMobSpawnEvent

NameTypeHas GetterHas Setter
Name
difficulty
Type
DifficultyInstance
Has Getter
true
Has Setter
true
Name
isSpawnCancelled
Type
boolean
Has Getter
true
Has Setter
false
Name
spawnCancelled
Type
FinalizeMobSpawnEvent
Has Getter
false
Has Setter
true
Name
spawnTag
Type
IData?
Has Getter
true
Has Setter
true
Name
spawnType
Type
MobSpawnType
Has Getter
true
Has Setter
false
Name
spawner
Type
BaseSpawner?
Has Getter
true
Has Setter
false