final class RegistryDelegate<T> extends java.lang.Object implements IRegistryDelegate<T>
Modifier and Type | Field and Description |
---|---|
private ResourceLocation |
name |
private T |
referent |
private java.lang.Class<T> |
type |
Constructor and Description |
---|
RegistryDelegate(T referent,
java.lang.Class<T> type) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
changeReference(T newTarget) |
boolean |
equals(java.lang.Object obj) |
T |
get()
Get the referent pointed at by this delegate.
|
int |
hashCode() |
ResourceLocation |
name()
Get the unique resource location for this delegate.
|
void |
setName(ResourceLocation name) |
java.lang.Class<T> |
type()
Get the delegate type.
|
private T referent
private ResourceLocation name
private final java.lang.Class<T> type
public T get()
IRegistryDelegate
get
in interface java.util.function.Supplier<T>
get
in interface IRegistryDelegate<T>
public ResourceLocation name()
IRegistryDelegate
name
in interface IRegistryDelegate<T>
public java.lang.Class<T> type()
IRegistryDelegate
type
in interface IRegistryDelegate<T>
void changeReference(T newTarget)
public void setName(ResourceLocation name)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object