Record Class RegistryWrapper<T>
java.lang.Object
java.lang.Record
dev.latvian.mods.kubejs.plugin.builtin.wrapper.RegistryWrapper<T>
- All Implemented Interfaces:
Iterable<T>
-
Constructor Summary
ConstructorsConstructorDescriptionRegistryWrapper(net.minecraft.core.Registry<T> registry, net.minecraft.resources.ResourceKey<T> unknownKey) Creates an instance of aRegistryWrapperrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic RegistryAccessContaineraccess()booleancontains(net.minecraft.resources.ResourceLocation id) booleancontainsValue(T value) final booleanIndicates whether some other object is "equal to" this one.get(net.minecraft.resources.ResourceLocation id) DataMapWrapper<T, ?> getDataMap(net.minecraft.resources.ResourceLocation id) @Nullable net.minecraft.resources.ResourceLocation@Nullable net.minecraft.resources.ResourceKey<T> Set<net.minecraft.resources.ResourceLocation> getKeys()getRandom(net.minecraft.util.RandomSource random) final inthashCode()Returns a hash code value for this object.@NotNull ListIterator<T> iterator()static RegistryWrapper<?> of(dev.latvian.mods.rhino.Context cx, 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.net.minecraft.resources.ResourceKey<T> Returns the value of theunknownKeyrecord component.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
-
RegistryWrapper
public RegistryWrapper(net.minecraft.core.Registry<T> registry, net.minecraft.resources.ResourceKey<T> unknownKey) Creates an instance of aRegistryWrapperrecord class.- Parameters:
registry- the value for theregistryrecord componentunknownKey- the value for theunknownKeyrecord component
-
-
Method Details
-
of
public static RegistryWrapper<?> of(dev.latvian.mods.rhino.Context cx, net.minecraft.resources.ResourceLocation id) -
access
-
get
-
contains
public boolean contains(net.minecraft.resources.ResourceLocation id) -
containsValue
-
getEntrySet
-
getValueMap
-
getValues
-
getDataMap
-
getValues
-
getKeys
-
getRandom
-
getRandom
-
getId
-
getKey
-
iterator
-
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
-
unknownKey
Returns the value of theunknownKeyrecord component.- Returns:
- the value of the
unknownKeyrecord component
-