Class DeferredItem<T extends Item>
java.lang.Object
net.neoforged.neoforge.registries.DeferredHolder<Item,T>
net.neoforged.neoforge.registries.DeferredItem<T>
- Type Parameters:
T
- The specificItem
type.
- All Implemented Interfaces:
Supplier<T>
,Holder<Item>
,ItemLike
,IHolderExtension<Item>
,IWithData<Item>
- Direct Known Subclasses:
DeferredItemBuilder
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.core.Holder
Holder.Direct<T>, Holder.Kind, Holder.Reference<T>
-
Field Summary
Fields inherited from class net.neoforged.neoforge.registries.DeferredHolder
key
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionasItem()
static <T extends Item>
DeferredItem<T> createItem
(ResourceKey<Item> key) Creates a newDeferredHolder
targeting the specifiedItem
.static <T extends Item>
DeferredItem<T> Creates a newDeferredHolder
targeting theItem
with the specified name.toStack()
toStack
(int count) Methods inherited from class net.neoforged.neoforge.registries.DeferredHolder
asOptional, bind, canSerializeIn, create, create, create, equals, get, getData, getDelegate, getId, getKey, getRegistry, hashCode, is, is, is, is, is, isBound, kind, tags, toString, unwrap, unwrapKey, value
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.core.Holder
getRegisteredName
Methods inherited from interface net.neoforged.neoforge.common.extensions.IHolderExtension
unwrapLookup
-
Constructor Details
-
DeferredItem
-
-
Method Details
-
toStack
-
toStack
- Parameters:
count
- The size of the stack to create
-
createItem
Creates a newDeferredHolder
targeting theItem
with the specified name. -
createItem
Creates a newDeferredHolder
targeting the specifiedItem
. -
asItem
-