Class TerminalStorageTabIngredientComponentItemStackCraftingClient
java.lang.Object
org.cyclops.integratedterminals.core.terminalstorage.TerminalStorageTabIngredientComponentClient<net.minecraft.world.item.ItemStack,Integer>
org.cyclops.integratedterminals.core.terminalstorage.TerminalStorageTabIngredientComponentItemStackCraftingClient
- All Implemented Interfaces:
ITerminalStorageTabClient<TerminalStorageSlotIngredient<net.minecraft.world.item.ItemStack,Integer>>
public class TerminalStorageTabIngredientComponentItemStackCraftingClient
extends TerminalStorageTabIngredientComponentClient<net.minecraft.world.item.ItemStack,Integer>
A client-side storage terminal ingredient tab for crafting with
ItemStack instances.-
Nested Class Summary
Nested classes/interfaces inherited from class org.cyclops.integratedterminals.core.terminalstorage.TerminalStorageTabIngredientComponentClient
TerminalStorageTabIngredientComponentClient.InstanceWithMetadata<T> -
Field Summary
Fields inherited from class org.cyclops.integratedterminals.core.terminalstorage.TerminalStorageTabIngredientComponentClient
container, ingredientComponentFields inherited from interface org.cyclops.integratedterminals.api.terminalstorage.ITerminalStorageTabClient
DEFAULT_SLOT_OFFSET_X, DEFAULT_SLOT_OFFSET_Y, DEFAULT_SLOT_ROW_LENGTH, DEFAULT_SLOT_VISIBLE_ROWS -
Constructor Summary
ConstructorsConstructorDescriptionTerminalStorageTabIngredientComponentItemStackCraftingClient(ContainerTerminalStorageBase container, net.minecraft.resources.ResourceLocation name, org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<?, ?> ingredientComponent) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.resources.ResourceLocationnet.minecraft.world.item.ItemStackgetIcon()intintnet.minecraft.resources.ResourceLocationList<net.minecraft.network.chat.Component>booleanhandleClick(net.minecraft.world.inventory.AbstractContainerMenu container, int channel, int hoveringStorageSlot, int mouseButton, boolean hasClickedOutside, boolean hasClickedInStorage, int hoveredContainerSlot) Called when a mouse click happens in a gui.protected voidloadButtons(List<ITerminalButton<?, ?, ?>> buttons) voidonCommonSlotRender(net.minecraft.client.gui.screens.inventory.AbstractContainerScreen gui, com.mojang.blaze3d.vertex.PoseStack matrixStack, ContainerScreenTerminalStorage.DrawLayer layer, float partialTick, int x, int y, int mouseX, int mouseY, int slot, ITerminalStorageTabCommon tabCommon) Methods inherited from class org.cyclops.integratedterminals.core.terminalstorage.TerminalStorageTabIngredientComponentClient
addCraftingOptions, computeDraggingQuantity, dragIntoSlot, findActiveSlotId, getActiveSlotId, getActiveSlotQuantity, getButtons, getChannels, getCraftingOptions, getFilteredIngredientsView, getIngredientComponent, getInstanceFilter, getInstanceFilterMetadata, getInstanceSorter, getMaxQuantity, getName, getRawUnfilteredIngredientsView, getSlot, getSlotCount, getSlotInstance, getSlots, getStatus, getTotalQuantity, getUnfilteredIngredientsView, getUniqueCraftingOptionOutputs, getViewHandler, handleActiveIngredientUpdate, handleScroll, isEnabled, isSlotValidForDraggingInto, onChange, onDeselect, onSelect, onToolTip, resetActiveSlot, resetFilteredIngredientsViews, setActiveSlotQuantity, setInstanceFilter, setMaxQuantity, transformIngredientsView, updateActiveInstanceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.cyclops.integratedterminals.api.terminalstorage.ITerminalStorageTabClient
getSlotOffsetY, getSlotVisibleRows
-
Constructor Details
-
TerminalStorageTabIngredientComponentItemStackCraftingClient
public TerminalStorageTabIngredientComponentItemStackCraftingClient(ContainerTerminalStorageBase container, net.minecraft.resources.ResourceLocation name, org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<?, ?> ingredientComponent)
-
-
Method Details
-
getTabSettingsName
public net.minecraft.resources.ResourceLocation getTabSettingsName()- Returns:
- The tab name that will be used to store
TerminalStorageStatesettings inside a tab. This can be used to modify in what tab certain settings are stored.
-
loadButtons
- Overrides:
loadButtonsin classTerminalStorageTabIngredientComponentClient<net.minecraft.world.item.ItemStack,Integer>
-
getIcon
public net.minecraft.world.item.ItemStack getIcon()- Specified by:
getIconin interfaceITerminalStorageTabClient<TerminalStorageSlotIngredient<net.minecraft.world.item.ItemStack,Integer>> - Overrides:
getIconin classTerminalStorageTabIngredientComponentClient<net.minecraft.world.item.ItemStack,Integer> - Returns:
- An icon for the tab.
-
getTooltip
- Specified by:
getTooltipin interfaceITerminalStorageTabClient<TerminalStorageSlotIngredient<net.minecraft.world.item.ItemStack,Integer>> - Overrides:
getTooltipin classTerminalStorageTabIngredientComponentClient<net.minecraft.world.item.ItemStack,Integer> - Returns:
- A tooltip when hovering over the icon.
-
getSlotOffsetX
public int getSlotOffsetX() -
getSlotRowLength
public int getSlotRowLength() -
getBackgroundTexture
@Nullable public net.minecraft.resources.ResourceLocation getBackgroundTexture()- Returns:
- An optional alternative background texture that should be used when rendering the gui of the tab.
-
handleClick
public boolean handleClick(net.minecraft.world.inventory.AbstractContainerMenu container, int channel, int hoveringStorageSlot, int mouseButton, boolean hasClickedOutside, boolean hasClickedInStorage, int hoveredContainerSlot) Description copied from interface:ITerminalStorageTabClientCalled when a mouse click happens in a gui.- Specified by:
handleClickin interfaceITerminalStorageTabClient<TerminalStorageSlotIngredient<net.minecraft.world.item.ItemStack,Integer>> - Overrides:
handleClickin classTerminalStorageTabIngredientComponentClient<net.minecraft.world.item.ItemStack,Integer> - Parameters:
container- The active container.channel- The active channel.hoveringStorageSlot- The storage slot id that is being hovered. -1 if none.mouseButton- The mouse button.hasClickedOutside- If the player has clicked outside the gui.hasClickedInStorage- If the player has clicked inside the storage space. This can be true even if the storage slot is -1.hoveredContainerSlot- The container slot id that is being hovered. -1 if none.- Returns:
- If further click processing should stop.
-
onCommonSlotRender
public void onCommonSlotRender(net.minecraft.client.gui.screens.inventory.AbstractContainerScreen gui, com.mojang.blaze3d.vertex.PoseStack matrixStack, ContainerScreenTerminalStorage.DrawLayer layer, float partialTick, int x, int y, int mouseX, int mouseY, int slot, ITerminalStorageTabCommon tabCommon) - Specified by:
onCommonSlotRenderin interfaceITerminalStorageTabClient<TerminalStorageSlotIngredient<net.minecraft.world.item.ItemStack,Integer>> - Overrides:
onCommonSlotRenderin classTerminalStorageTabIngredientComponentClient<net.minecraft.world.item.ItemStack,Integer>
-