Skip to content

ARegistryCondition

data class ARegistryCondition(registry: @Serializable



(with = ResourceLocationSerializer::class) ResourceLocation, entries: List<@Serializable



(with = ResourceLocationSerializer::class) ResourceLocation>) : IACondition

Condition that holds when every id in entries is registered in the registry keyed by registry.

Constructors

ARegistryCondition

constructor(registry: @Serializable



(with = ResourceLocationSerializer::class) ResourceLocation, entries: List<@Serializable



(with = ResourceLocationSerializer::class) ResourceLocation>)
constructor(registry: ResourceLocation, vararg entries: ResourceLocation)

Types

Companion

object Companion

Properties

codec

@Transient



open override val codec: MapCodec<out IACondition>

The codec used to (de)serialize this condition to/from JSON.

identifier

@Transient



open override val identifier: ResourceLocation

The condition type's registered id, matching the key it was registered under.

neoforge

Wraps this condition as a NeoForge ICondition. Public so archie-datagen can attach conditions to generated recipes.

val MapCodec<out IACondition>.neoforge: MapCodec<NeoForgeCondition>

Wraps this codec as a NeoForge condition-serializer codec.

Functions

test

open override fun test(context: IACondition.IContext): Boolean

Evaluates this condition against context, returning whether it holds.

toString

open override fun toString(): String