Uso e vincoli
Vieta la cattura di entità temporanee, con altro proprietario o non ripristinabili. null non annulla le esclusioni del nucleo, inclusi i giocatori.
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?
}
Fonte
src/main/kotlin/dev/nebulastorage/api/platform/NebulaCreatureCaptureRule.kt; editorial/it.json
43b4d12d69e6033c24fa8c39dac383ef2429b446