Interface ServerEntityEvents.AllowLoad

Enclosing class:
ServerEntityEvents
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface ServerEntityEvents.AllowLoad
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    onAllowLoad(net.minecraft.world.entity.Entity entity, net.minecraft.server.level.ServerLevel level, @Nullable net.minecraft.world.entity.EntitySpawnReason spawnReason, boolean isLoadedFromDisk)
    Called right before an Entity is loaded into a ServerLevel.
  • Method Details

    • onAllowLoad

      boolean onAllowLoad(net.minecraft.world.entity.Entity entity, net.minecraft.server.level.ServerLevel level, @Nullable net.minecraft.world.entity.EntitySpawnReason spawnReason, boolean isLoadedFromDisk)
      Called right before an Entity is loaded into a ServerLevel.
      Returns:
      true to allow the load, false to cancel the load.