Interface IDataComponentHolderExtension
- All Known Subinterfaces:
DataComponentHolder
,MutableDataComponentHolder
- All Known Implementing Classes:
FluidStack
,ItemStack
,SimpleFluidContent
public interface IDataComponentHolderExtension
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T extends TooltipProvider>
voidaddToTooltip
(Supplier<? extends DataComponentType<T>> type, Item.TooltipContext context, Consumer<Component> adder, TooltipFlag flag) default <T extends TooltipProvider>
voidaddToTooltip
(DataComponentType<T> type, Item.TooltipContext context, Consumer<Component> adder, TooltipFlag flag) default <T> T
get
(Supplier<? extends DataComponentType<? extends T>> type) default <T> T
getOrDefault
(Supplier<? extends DataComponentType<? extends T>> type, T defaultValue) default boolean
has
(Supplier<? extends DataComponentType<?>> type) private DataComponentHolder
self()
-
Method Details
-
self
-
get
-
getOrDefault
-
has
-
addToTooltip
default <T extends TooltipProvider> void addToTooltip(DataComponentType<T> type, Item.TooltipContext context, Consumer<Component> adder, TooltipFlag flag) -
addToTooltip
default <T extends TooltipProvider> void addToTooltip(Supplier<? extends DataComponentType<T>> type, Item.TooltipContext context, Consumer<Component> adder, TooltipFlag flag)
-