Record Class DataMapWrapper<T,A>
java.lang.Object
java.lang.Record
dev.latvian.mods.kubejs.plugin.builtin.wrapper.DataMapWrapper<T,A>
- All Implemented Interfaces:
Iterable<DataMapWrapper.Data<T,A>>
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionDataMapWrapper(net.minecraft.core.Registry<T> registry, net.neoforged.neoforge.registries.datamaps.DataMapType<T, A> type) Creates an instance of aDataMapWrapperrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbyKey()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull Iterator<DataMapWrapper.Data<T, A>> iterator()keys()static <T> DataMapWrapper<T, ?> of(RegistryWrapper<T> registry, net.minecraft.resources.ResourceLocation id) static DataMapWrapper<?, ?> of(dev.latvian.mods.rhino.Context cx, net.minecraft.resources.ResourceLocation registry, net.minecraft.resources.ResourceLocation id) net.minecraft.core.Registry<T> registry()Returns the value of theregistryrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.static <T> net.neoforged.neoforge.registries.datamaps.DataMapType<T, ?> typeOf(RegistryWrapper<T> registry, net.minecraft.resources.ResourceLocation id) static net.neoforged.neoforge.registries.datamaps.DataMapType<?, ?> typeOf(dev.latvian.mods.rhino.Context cx, net.minecraft.resources.ResourceLocation registry, net.minecraft.resources.ResourceLocation id) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
DataMapWrapper
public DataMapWrapper(net.minecraft.core.Registry<T> registry, net.neoforged.neoforge.registries.datamaps.DataMapType<T, A> type) Creates an instance of aDataMapWrapperrecord class.- Parameters:
registry- the value for theregistryrecord componenttype- the value for thetyperecord component
-
-
Method Details
-
of
public static DataMapWrapper<?,?> of(dev.latvian.mods.rhino.Context cx, net.minecraft.resources.ResourceLocation registry, net.minecraft.resources.ResourceLocation id) -
typeOf
public static net.neoforged.neoforge.registries.datamaps.DataMapType<?,?> typeOf(dev.latvian.mods.rhino.Context cx, net.minecraft.resources.ResourceLocation registry, net.minecraft.resources.ResourceLocation id) -
of
public static <T> DataMapWrapper<T,?> of(RegistryWrapper<T> registry, net.minecraft.resources.ResourceLocation id) -
typeOf
public static <T> net.neoforged.neoforge.registries.datamaps.DataMapType<T,?> typeOf(RegistryWrapper<T> registry, net.minecraft.resources.ResourceLocation id) -
get
-
keys
-
iterator
-
byKey
-
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). -
registry
Returns the value of theregistryrecord component.- Returns:
- the value of the
registryrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-