Usage and constraints
Veto capture when an entity belongs to another owner, is temporary, or cannot be restored safely. Returning null only means this rule has no objection; it cannot override the core exclusions for players and unsafe entities.
NebulaCreatureCaptureRule
package dev.nebulastorage.api.platform
import net.minecraft.world.entity.Mob
enum class CreatureCaptureRestriction { EXTERNAL_OWNER, TEMPORARY_ENTITY, UNSUPPORTED_STATE }
/**
* Additional veto before capture and restitution, evaluated on the server thread without mutating the mob or loading chunks.
* Null means this rule has no objection, not that the entity's external state has been certified.
* A rule cannot override Nebula's UUID, payload, passenger, raid or persistence checks.
*/
fun interface NebulaCreatureCaptureRule {
fun restriction(mob: Mob): CreatureCaptureRestriction?
}
Source
src/main/kotlin/dev/nebulastorage/api/platform/NebulaCreatureCaptureRule.kt; editorial/en.json
43b4d12d69e6033c24fa8c39dac383ef2429b446