Record Class SimpleBuilder.SimpleRegistryAccess<K,V>
java.lang.Object
java.lang.Record
com.simibubi.create.api.registry.registrate.SimpleBuilder.SimpleRegistryAccess<K,V>
- Enclosing class:
SimpleBuilder<R,T extends R, P>
protected static record SimpleBuilder.SimpleRegistryAccess<K,V> (BiConsumer<K,V> adder, BiConsumer<net.minecraft.tags.TagKey<K>,V> tagAdder)
extends Record
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSimpleRegistryAccess(BiConsumer<K, V> adder, BiConsumer<net.minecraft.tags.TagKey<K>, V> tagAdder) Creates an instance of aSimpleRegistryAccessrecord class. -
Method Summary
Modifier and TypeMethodDescriptionBiConsumer<K, V> adder()Returns the value of theadderrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static <K,V> SimpleBuilder.SimpleRegistryAccess <K, V> of(SimpleRegistry.Multi<K, V> registry, Function<K, net.minecraft.core.Holder<K>> holderGetter) static <K,V> SimpleBuilder.SimpleRegistryAccess <K, V> of(SimpleRegistry<K, V> registry, Function<K, net.minecraft.core.Holder<K>> holderGetter) BiConsumer<net.minecraft.tags.TagKey<K>, V> tagAdder()Returns the value of thetagAdderrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SimpleRegistryAccess
protected SimpleRegistryAccess(BiConsumer<K, V> adder, BiConsumer<net.minecraft.tags.TagKey<K>, V> tagAdder) Creates an instance of aSimpleRegistryAccessrecord class.- Parameters:
adder- the value for theadderrecord componenttagAdder- the value for thetagAdderrecord component
-
-
Method Details
-
of
public static <K,V> SimpleBuilder.SimpleRegistryAccess<K,V> of(SimpleRegistry<K, V> registry, Function<K, net.minecraft.core.Holder<K>> holderGetter) -
of
public static <K,V> SimpleBuilder.SimpleRegistryAccess<K,V> of(SimpleRegistry.Multi<K, V> registry, Function<K, net.minecraft.core.Holder<K>> holderGetter) -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
adder
Returns the value of theadderrecord component.- Returns:
- the value of the
adderrecord component
-
tagAdder
Returns the value of thetagAdderrecord component.- Returns:
- the value of the
tagAdderrecord component
-