Class SHolder<T>
java.lang.Object
net.lcc.sollib.api.common.registry.SHolder<T>
- All Implemented Interfaces:
Supplier<T>
- Direct Known Subclasses:
BlockHolder,DensityFunctionHolder,EffectHolder,EntityHolder,ItemHolder
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget()Retrieves the cached entry if it exists, otherwise calls the supplier to create a new entry.net.minecraft.core.Holder<T> Retrieves the cached entry if it exists, otherwise calls the supplier to create a new entry, and wraps it in a holder.net.minecraft.resources.ResourceLocationgetID()net.minecraft.core.Registry<T>
-
Field Details
-
mod
-
name
-
-
Constructor Details
-
SHolder
-
-
Method Details
-
get
Retrieves the cached entry if it exists, otherwise calls the supplier to create a new entry. -
getAsHolder
Retrieves the cached entry if it exists, otherwise calls the supplier to create a new entry, and wraps it in a holder.- Returns:
- A holder of the cached entry, or of a new entry if the cached entry does not exist.
If
getRegistry()returns null, the holder will be direct.
-
getID
public net.minecraft.resources.ResourceLocation getID()- Returns:
- This entry's identifier, built from its name and mod container
-
getRegistry
-