Package net.minecraftforge.registries
Class RegistryDelegate<T>
java.lang.Object
net.minecraftforge.registries.RegistryDelegate<T>
- All Implemented Interfaces:
Supplier<T>
,IRegistryDelegate<T>
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription(package private) void
changeReference
(T newTarget) boolean
get()
Get the referent pointed at by this delegate.int
hashCode()
name()
Get the unique resource location for this delegate.void
setName
(ResourceLocation name) type()
Get the delegate type.
-
Field Details
-
referent
-
name
-
type
-
-
Constructor Details
-
RegistryDelegate
-
-
Method Details
-
get
Description copied from interface:IRegistryDelegate
Get the referent pointed at by this delegate. This will be the currently active item or block, and will change as world saves come and go. Note that item.delegate.get() may NOT be the same object as item, due to item and block substitution. -
name
Description copied from interface:IRegistryDelegate
Get the unique resource location for this delegate. Completely static after registration has completed, and will never change.- Specified by:
name
in interfaceIRegistryDelegate<T>
- Returns:
- The name
-
type
Description copied from interface:IRegistryDelegate
Get the delegate type. It will be dependent on the registry this delegate is sourced from.- Specified by:
type
in interfaceIRegistryDelegate<T>
- Returns:
- The type of delegate
-
changeReference
-
setName
-
equals
-
hashCode
public int hashCode()
-