Class EmptyPreviewProvider
java.lang.Object
com.misterpemodder.shulkerboxtooltip.api.provider.EmptyPreviewProvider
- All Implemented Interfaces:
PreviewProvider
A PreviewProvider that does nothing.
- Since:
- 1.3.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<net.minecraft.world.item.ItemStack> getInventory(PreviewContext context) Fetches the items to be displayed in the preview.intgetInventoryMaxSize(PreviewContext context) Returns the maximum amount of slots this preview can display.booleanshouldDisplay(PreviewContext context) Queries if the preview window should be displayed for the given context.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.misterpemodder.shulkerboxtooltip.api.provider.PreviewProvider
addTooltip, getCompactMaxRowSize, getFullTooltipHintLangKey, getLockKeyTooltipHintLangKey, getMaxRowSize, getPriority, getRenderer, getTextureOverride, getTooltipHintLangKey, getWindowColorKey, isFullPreviewAvailable, onInventoryAccessStart, showTooltipHints
-
Field Details
-
INSTANCE
The EmptyPreviewProvider instance.- Since:
- 1.3.0
-
-
Constructor Details
-
EmptyPreviewProvider
protected EmptyPreviewProvider()Default constructor.
-
-
Method Details
-
getInventoryMaxSize
Description copied from interface:PreviewProviderReturns the maximum amount of slots this preview can display.- Specified by:
getInventoryMaxSizein interfacePreviewProvider- Parameters:
context- The preview context.- Returns:
- The maximum inventory size for the given stack.
-
shouldDisplay
Description copied from interface:PreviewProviderQueries if the preview window should be displayed for the given context. Should returnfalseif the inventory is empty.- Specified by:
shouldDisplayin interfacePreviewProvider- Parameters:
context- The preview context.- Returns:
- Whether the preview should be displayed.
-
getInventory
Description copied from interface:PreviewProviderFetches the items to be displayed in the preview.- Specified by:
getInventoryin interfacePreviewProvider- Parameters:
context- The preview context.- Returns:
- The list of items, may not be null or contain null elements.
-