Package dev.latvian.mods.kubejs.entity
Class CheckLivingEntitySpawnKubeEvent
java.lang.Object
dev.latvian.mods.kubejs.entity.CheckLivingEntitySpawnKubeEvent
- All Implemented Interfaces:
KubeEntityEvent,KubeLivingEntityEvent,KubeEvent,KubeLevelEvent
@Info("Invoked before an entity is spawned into the world.\n\nOnly entities from a `BaseSpawner` or world generation will trigger this event.\n")
public class CheckLivingEntitySpawnKubeEvent
extends Object
implements KubeLivingEntityEvent
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCheckLivingEntitySpawnKubeEvent(net.minecraft.world.entity.LivingEntity entity, net.minecraft.world.level.Level level, double x, double y, double z, net.minecraft.world.entity.MobSpawnType type, com.mojang.datafixers.util.Either<net.minecraft.world.level.block.entity.BlockEntity, net.minecraft.world.entity.Entity> spawnerEither) -
Method Summary
Modifier and TypeMethodDescriptiongetBlock()net.minecraft.world.entity.LivingEntitynet.minecraft.world.level.LevelgetLevel()@NotNull WrappedSpawnernet.minecraft.world.entity.MobSpawnTypegetType()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.latvian.mods.kubejs.entity.KubeEntityEvent
getPlayerMethods inherited from interface dev.latvian.mods.kubejs.event.KubeEvent
afterPosted, cancel, cancel, defaultExitValue, exit, exit, getExitValueType, mapExitValue, success, successMethods inherited from interface dev.latvian.mods.kubejs.level.KubeLevelEvent
getRegistries, getServer
-
Field Details
-
x
public final double x -
y
public final double y -
z
public final double z -
type
public final transient net.minecraft.world.entity.MobSpawnType type -
spawner
-
-
Constructor Details
-
CheckLivingEntitySpawnKubeEvent
public CheckLivingEntitySpawnKubeEvent(net.minecraft.world.entity.LivingEntity entity, net.minecraft.world.level.Level level, double x, double y, double z, net.minecraft.world.entity.MobSpawnType type, com.mojang.datafixers.util.Either<net.minecraft.world.level.block.entity.BlockEntity, net.minecraft.world.entity.Entity> spawnerEither)
-
-
Method Details
-
getLevel
@Info("The level the entity is being spawned into.") public net.minecraft.world.level.Level getLevel()- Specified by:
getLevelin interfaceKubeEntityEvent- Specified by:
getLevelin interfaceKubeLevelEvent
-
getEntity
- Specified by:
getEntityin interfaceKubeEntityEvent- Specified by:
getEntityin interfaceKubeLivingEntityEvent
-
getBlock
-
getType
-
getSpawner
-