public abstract class Registry
extends java.lang.Object
RegistryEntrys and TagKeys.| Modifier | Constructor and Description |
|---|---|
protected |
Registry(com.viaversion.viaversion.libs.mcstructs.core.Identifier name) |
| Modifier and Type | Method and Description |
|---|---|
com.viaversion.viaversion.libs.mcstructs.converter.codec.Codec<RegistryEntry> |
entryCodec() |
boolean |
equals(java.lang.Object o) |
abstract RegistryEntry |
getEntry(com.viaversion.viaversion.libs.mcstructs.core.Identifier id)
Get the
RegistryEntry for the given id. |
abstract RegistryEntry |
getEntry(int networkId)
Get the
RegistryEntry for the given network id. |
<T> Holder<T> |
getHolder(com.viaversion.viaversion.libs.mcstructs.core.Identifier id)
Get an
Holder for the given id. |
<T> Holder<T> |
getHolder(int networkId)
Get an
Holder for the given network id. |
abstract com.viaversion.viaversion.libs.mcstructs.core.Identifier |
getId(int networkId)
Get the id for the given network id.
|
com.viaversion.viaversion.libs.mcstructs.core.Identifier |
getName() |
abstract java.lang.Integer |
getNetworkId(com.viaversion.viaversion.libs.mcstructs.core.Identifier id)
Get the network id for the given id.
|
abstract TagKey |
getTag(com.viaversion.viaversion.libs.mcstructs.core.Identifier tag)
Get the
TagKey for the given tag id. |
int |
hashCode() |
java.lang.String |
toString() |
protected Registry(@Nonnull
com.viaversion.viaversion.libs.mcstructs.core.Identifier name)
public com.viaversion.viaversion.libs.mcstructs.core.Identifier getName()
public com.viaversion.viaversion.libs.mcstructs.converter.codec.Codec<RegistryEntry> entryCodec()
RegistryEntrys in this registry@Nullable public abstract RegistryEntry getEntry(com.viaversion.viaversion.libs.mcstructs.core.Identifier id)
RegistryEntry for the given id.id - The id of the entry@Nullable public abstract RegistryEntry getEntry(int networkId)
RegistryEntry for the given network id.networkId - The network id of the entry@Nullable public abstract java.lang.Integer getNetworkId(com.viaversion.viaversion.libs.mcstructs.core.Identifier id)
id - The id of the entry@Nullable public abstract com.viaversion.viaversion.libs.mcstructs.core.Identifier getId(int networkId)
networkId - The network id of the entry@Nullable public <T> Holder<T> getHolder(com.viaversion.viaversion.libs.mcstructs.core.Identifier id)
Holder for the given id.T - The type of the entryid - The id of the entry@Nullable public <T> Holder<T> getHolder(int networkId)
Holder for the given network id.T - The type of the entrynetworkId - The network id of the entry@Nullable public abstract TagKey getTag(com.viaversion.viaversion.libs.mcstructs.core.Identifier tag)
TagKey for the given tag id.tag - The id of the tagpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object