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.

script.zs
import crafttweaker.forge.api.event.entity.living.spawn.FinalizeMobSpawnEvent;

Extends

FinalizeMobSpawnEvent extends MobSpawnEvent.

Listening to the event

This event can be listened to like so:

script.zs
events.register<crafttweaker.forge.api.event.entity.living.spawn.FinalizeMobSpawnEvent>(event => {
println("FinalizeMobSpawnEvent ran!");
});

Members

cancel()
Cancels the event. Same as setCanceled(true)
script.zs
// FinalizeSpawn.cancel();
event.cancel();
Getter
script.zs
// FinalizeSpawn.cancelable as bool
event.cancelable

Return Type: bool

cancelable() as bool
script.zs
// FinalizeSpawn.cancelable() as bool;
event.cancelable();

Return Type: bool

Getter
script.zs
// FinalizeSpawn.canceled as bool
event.canceled

Return Type: bool

Setter
script.zs
// FinalizeSpawn.canceled = (cancel as bool);
event.canceled = myBool;

Parameters:

cancel Type: bool
canceled() as bool
script.zs
// FinalizeSpawn.canceled() as bool;
event.canceled();

Return Type: bool

canceled(cancel as bool)
script.zs
// FinalizeSpawn.canceled(cancel as bool);
event.canceled(myBool);

Parameters:

cancel Type: bool
Getter
script.zs
// FinalizeSpawn.difficulty as DifficultyInstance
event.difficulty

Return Type: DifficultyInstance

Setter
script.zs
// FinalizeSpawn.difficulty = (inst as DifficultyInstance);
event.difficulty = myDifficultyInstance;

Parameters:

Getter
script.zs
// FinalizeSpawn.entity as Mob
event.entity

Return Type: Mob

Getter
script.zs
// FinalizeSpawn.entity as Entity
event.entity

Return Type: Entity

Getter
script.zs
// FinalizeSpawn.hasResult as bool
event.hasResult

Return Type: bool

hasResult() as bool
script.zs
// FinalizeSpawn.hasResult() as bool;
event.hasResult();

Return Type: bool

Getter
script.zs
// FinalizeSpawn.isSpawnCancelled as bool
event.isSpawnCancelled

Return Type: bool

Getter
script.zs
// FinalizeSpawn.level as ServerLevelAccessor
event.level

Return Type: ServerLevelAccessor

Getter
script.zs
// FinalizeSpawn.result as Result
event.result

Return Type: EventResult

Setter
script.zs
// FinalizeSpawn.result = (result as Result);
event.result = myResult;

Parameters:

result Type: EventResult
result() as Result
script.zs
// FinalizeSpawn.result() as Result;
event.result();

Return Type: EventResult

result(result as Result)
script.zs
// FinalizeSpawn.result(result as Result);
event.result(myResult);

Parameters:

result Type: EventResult
setAllow()
sets the event's result to allow
script.zs
// FinalizeSpawn.setAllow();
event.setAllow();
setDefault()
sets the event's result to default
script.zs
// FinalizeSpawn.setDefault();
event.setDefault();
setDeny()
sets the event's result to deny
script.zs
// FinalizeSpawn.setDeny();
event.setDeny();
Setter
script.zs
// FinalizeSpawn.spawnCancelled = (cancel as bool);
event.spawnCancelled = myBool;

Parameters:

cancel Type: bool
Getter
script.zs
// FinalizeSpawn.spawner as BaseSpawner
event.spawner

Return Type: BaseSpawner

Getter
script.zs
// FinalizeSpawn.spawnTag as IData
event.spawnTag

Return Type: IData

Setter
script.zs
// FinalizeSpawn.spawnTag = (tag as IData);
event.spawnTag = myIData;

Parameters:

tag Type: IData
Getter
script.zs
// FinalizeSpawn.spawnType as MobSpawnType
event.spawnType

Return Type: MobSpawnType

Getter
script.zs
// FinalizeSpawn.x as double
event.x

Return Type: double

Getter
script.zs
// FinalizeSpawn.y as double
event.y

Return Type: double

Getter
script.zs
// FinalizeSpawn.z as double
event.z

Return Type: double