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

      @Nullable public transient @Nullable WrappedSpawner 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:
      getLevel in interface KubeEntityEvent
      Specified by:
      getLevel in interface KubeLevelEvent
    • getEntity

      @Info("The entity being spawned.") public net.minecraft.world.entity.LivingEntity getEntity()
      Specified by:
      getEntity in interface KubeEntityEvent
      Specified by:
      getEntity in interface KubeLivingEntityEvent
    • getBlock

      @Info("The block the entity is being spawned on.") public LevelBlock getBlock()
    • getType

      @Info("The type of spawn.") public net.minecraft.world.entity.MobSpawnType getType()
    • getSpawner

      @Info("The spawner that spawned the entity.") @NotNull public @NotNull WrappedSpawner getSpawner()