Record Class RegistriesWithConditions
java.lang.Object
java.lang.Record
net.neoforged.neoforge.common.data.RegistriesWithConditions
- All Implemented Interfaces:
HolderGetter.Provider, HolderLookup.Provider, IHolderLookupProviderExtension
public record RegistriesWithConditions(HolderLookup.Provider registries, Map<ResourceKey<? extends Registry<?>>, Map<ResourceKey<?>, List<ICondition>>> conditionsByRegistry)
extends Record
implements HolderLookup.Provider
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<ResourceKey<? extends Registry<?>>, Map<ResourceKey<?>, List<ICondition>>> The field for theconditionsByRegistryrecord component.private final HolderLookup.ProviderThe field for theregistriesrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionRegistriesWithConditions(HolderLookup.Provider registries) RegistriesWithConditions(HolderLookup.Provider registries, Map<ResourceKey<? extends Registry<?>>, Map<ResourceKey<?>, List<ICondition>>> conditionsByRegistry) Creates an instance of aRegistriesWithConditionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionMap<ResourceKey<? extends Registry<?>>, Map<ResourceKey<?>, List<ICondition>>> Returns the value of theconditionsByRegistryrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Stream<ResourceKey<? extends Registry<?>>> <T> Optional<? extends HolderLookup.RegistryLookup<T>> lookup(ResourceKey<? extends Registry<? extends T>> key) Returns the value of theregistriesrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface HolderGetter.Provider
get, get, getOrThrow, getOrThrowMethods inherited from interface HolderLookup.Provider
allRegistriesLifecycle, createSerializationContext, listRegistries, lookupOrThrowMethods inherited from interface IHolderLookupProviderExtension
holder, holderOrThrow
-
Field Details
-
registries
The field for theregistriesrecord component. -
conditionsByRegistry
private final Map<ResourceKey<? extends Registry<?>>, Map<ResourceKey<?>, List<ICondition>>> conditionsByRegistryThe field for theconditionsByRegistryrecord component.
-
-
Constructor Details
-
RegistriesWithConditions
-
RegistriesWithConditions
public RegistriesWithConditions(HolderLookup.Provider registries, Map<ResourceKey<? extends Registry<?>>, Map<ResourceKey<?>, List<ICondition>>> conditionsByRegistry) Creates an instance of aRegistriesWithConditionsrecord class.- Parameters:
registries- the value for theregistriesrecord componentconditionsByRegistry- the value for theconditionsByRegistryrecord component
-
-
Method Details
-
listRegistryKeys
- Specified by:
listRegistryKeysin interfaceHolderLookup.Provider
-
lookup
public <T> Optional<? extends HolderLookup.RegistryLookup<T>> lookup(ResourceKey<? extends Registry<? extends T>> key) - Specified by:
lookupin interfaceHolderGetter.Provider- Specified by:
lookupin interfaceHolderLookup.Provider
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
registries
Returns the value of theregistriesrecord component.- Returns:
- the value of the
registriesrecord component
-
conditionsByRegistry
public Map<ResourceKey<? extends Registry<?>>, Map<ResourceKey<?>, List<ICondition>>> conditionsByRegistry()Returns the value of theconditionsByRegistryrecord component.- Returns:
- the value of the
conditionsByRegistryrecord component
-