使い方と制約
別の所有者を持つ・一時的・安全に復元できないエンティティの捕獲を拒否します。nullはこの規則が反対しないだけで、プレイヤー等の基本除外を上書きしません。
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?
}
ソース
src/main/kotlin/dev/nebulastorage/api/platform/NebulaCreatureCaptureRule.kt; editorial/ja.json
43b4d12d69e6033c24fa8c39dac383ef2429b446