Record Class NeoForgeAdvancementProvider.AdvancementRewriteContext
java.lang.Object
java.lang.Record
net.neoforged.neoforge.common.data.internal.NeoForgeAdvancementProvider.AdvancementRewriteContext
- All Implemented Interfaces:
BootstrapContext<Advancement>, BootstrapContextAccess, BootstrapContextAccessExtension, BootstrapContextExtension<Advancement>
- Enclosing class:
NeoForgeAdvancementProvider
private static record NeoForgeAdvancementProvider.AdvancementRewriteContext(BootstrapContext<Advancement> baseContext, List<BiFunction<Criterion<?>, BootstrapContextAccess, @Nullable Criterion<?>>> criteriaReplacers)
extends Record
implements BootstrapContext<Advancement>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BootstrapContext<Advancement> The field for thebaseContextrecord component.private final List<BiFunction<Criterion<?>, BootstrapContextAccess, @Nullable Criterion<?>>> The field for thecriteriaReplacersrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateAdvancementRewriteContext(BootstrapContext<Advancement> baseContext, List<BiFunction<Criterion<?>, BootstrapContextAccess, @Nullable Criterion<?>>> criteriaReplacers) Creates an instance of aAdvancementRewriteContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebaseContextrecord component.Returns the value of thecriteriaReplacersrecord component.final booleanIndicates whether some other object is "equal to" this one.private @Nullable Advancement.BuilderfindAndReplace(Advancement advancement, BootstrapContextAccess registries) final inthashCode()Returns a hash code value for this object.<S> Stream<Holder.Reference<S>> listContextElements(ResourceKey<? extends Registry<? extends S>> key) Deprecated.<S> HolderGetter<S> lookup(ResourceKey<? extends Registry<? extends S>> key) register(ResourceKey<Advancement> key, Advancement value) final StringtoString()Returns a string representation of this record class.Methods inherited from interface BootstrapContextAccessExtension
holderLookupMethods inherited from interface BootstrapContextExtension
register
-
Field Details
-
baseContext
The field for thebaseContextrecord component. -
criteriaReplacers
private final List<BiFunction<Criterion<?>, BootstrapContextAccess, @Nullable Criterion<?>>> criteriaReplacersThe field for thecriteriaReplacersrecord component.
-
-
Constructor Details
-
AdvancementRewriteContext
private AdvancementRewriteContext(BootstrapContext<Advancement> baseContext, List<BiFunction<Criterion<?>, BootstrapContextAccess, @Nullable Criterion<?>>> criteriaReplacers) Creates an instance of aAdvancementRewriteContextrecord class.- Parameters:
baseContext- the value for thebaseContextrecord componentcriteriaReplacers- the value for thecriteriaReplacersrecord component
-
-
Method Details
-
register
- Specified by:
registerin interfaceBootstrapContext<Advancement>
-
lookup
- Specified by:
lookupin interfaceBootstrapContextAccess
-
listContextElements
@Deprecated public <S> Stream<Holder.Reference<S>> listContextElements(ResourceKey<? extends Registry<? extends S>> key) Deprecated.- Specified by:
listContextElementsin interfaceBootstrapContextAccess
-
findAndReplace
private @Nullable Advancement.Builder findAndReplace(Advancement advancement, BootstrapContextAccess registries) -
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). -
baseContext
Returns the value of thebaseContextrecord component.- Returns:
- the value of the
baseContextrecord component
-
criteriaReplacers
public List<BiFunction<Criterion<?>, BootstrapContextAccess, @Nullable Criterion<?>>> criteriaReplacers()Returns the value of thecriteriaReplacersrecord component.- Returns:
- the value of the
criteriaReplacersrecord component
-