FinalizeMobSpawnEvent
Importing the class
If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.
import crafttweaker.neoforge.api.event.entity.living.spawn.FinalizeMobSpawnEvent;
Extends
FinalizeMobSpawnEvent extends MobSpawnEvent
.
Implements
FinalizeMobSpawnEvent
implements the following interfaces:
Listening to the event
This event can be listened to like so:
events.register<crafttweaker.neoforge.api.event.entity.living.spawn.FinalizeMobSpawnEvent>(event => { println("FinalizeMobSpawnEvent ran!");});
Members
Getter
// FinalizeSpawnEvent.blockEntitySpawner as BlockEntityevent.blockEntitySpawner
Return Type:
BlockEntity
cancel()
Cancels the event. Same as script.zs
setCanceled(true)
// FinalizeSpawnEvent.cancel();event.cancel();
Getter
// FinalizeSpawnEvent.canceled as boolevent.canceled
Return Type:
bool
Setter
// FinalizeSpawnEvent.canceled = (cancel as bool);event.canceled = myBool;
Parameters:
cancel: bool
Type: bool
canceled() as bool
// FinalizeSpawnEvent.canceled() as bool;event.canceled();
Return Type:
bool
canceled(cancel as bool)
// FinalizeSpawnEvent.canceled(cancel as bool);event.canceled(myBool);
Parameters:
cancel: bool
Type: bool
Getter
// FinalizeSpawnEvent.difficulty as DifficultyInstanceevent.difficulty
Return Type:
DifficultyInstance
Setter
event.difficulty = myDifficultyInstance;
Parameters:
inst: DifficultyInstance
Type: DifficultyInstance
Getter
// FinalizeSpawnEvent.isSpawnCancelled as boolevent.isSpawnCancelled
Return Type:
bool
Getter
// FinalizeSpawnEvent.level as ServerLevelAccessorevent.level
Return Type:
ServerLevelAccessor
Setter
// FinalizeSpawnEvent.spawnCancelled = (cancel as bool);event.spawnCancelled = myBool;
Parameters:
cancel: bool
Type: bool
Getter
// FinalizeSpawnEvent.spawnType as MobSpawnTypeevent.spawnType
Return Type:
MobSpawnType
Getter
// FinalizeSpawnEvent.x as doubleevent.x
Return Type:
double
Getter
// FinalizeSpawnEvent.y as doubleevent.y
Return Type:
double
Getter
// FinalizeSpawnEvent.z as doubleevent.z
Return Type:
double