Class TerminalButtonFilterCrafting<T>
java.lang.Object
org.cyclops.integratedterminals.core.terminalstorage.button.TerminalButtonFilterCrafting<T>
- All Implemented Interfaces:
ITerminalButton<TerminalStorageTabIngredientComponentClient<T,?>, TerminalStorageTabIngredientComponentCommon<T, ?>, org.cyclops.cyclopscore.client.gui.component.button.ButtonImage>
public class TerminalButtonFilterCrafting<T>
extends Object
implements ITerminalButton<TerminalStorageTabIngredientComponentClient<T,?>,TerminalStorageTabIngredientComponentCommon<T,?>,org.cyclops.cyclopscore.client.gui.component.button.ButtonImage>
A button for clearing the crafting grid.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionTerminalButtonFilterCrafting(TerminalStorageState state, ITerminalStorageTabClient<?> clientTab) -
Method Summary
Modifier and TypeMethodDescriptionorg.cyclops.cyclopscore.client.gui.component.button.ButtonImagecreateButton(int x, int y) Create a gui button for displaying this button.voidgetTooltip(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.TooltipFlag tooltipFlag, List<net.minecraft.network.chat.Component> lines) Get the tooltip of this sorter.voidonClick(TerminalStorageTabIngredientComponentClient<T, ?> clientTab, TerminalStorageTabIngredientComponentCommon<T, ?> commomTab, org.cyclops.cyclopscore.client.gui.component.button.ButtonImage guiButton, int channel, int mouseButton) Callback for when the gui button has been clicked.voidReload the button's visual representation based on the container's state.Methods 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.ITerminalButton
getX, getY, isInLeftColumn
-
Constructor Details
-
TerminalButtonFilterCrafting
public TerminalButtonFilterCrafting(TerminalStorageState state, ITerminalStorageTabClient<?> clientTab)
-
-
Method Details
-
reloadFromState
public void reloadFromState()Description copied from interface:ITerminalButtonReload the button's visual representation based on the container's state.- Specified by:
reloadFromStatein interfaceITerminalButton<TerminalStorageTabIngredientComponentClient<T,?>, TerminalStorageTabIngredientComponentCommon<T, ?>, org.cyclops.cyclopscore.client.gui.component.button.ButtonImage>
-
createButton
public org.cyclops.cyclopscore.client.gui.component.button.ButtonImage createButton(int x, int y) Description copied from interface:ITerminalButtonCreate a gui button for displaying this button.- Specified by:
createButtonin interfaceITerminalButton<TerminalStorageTabIngredientComponentClient<T,?>, TerminalStorageTabIngredientComponentCommon<T, ?>, org.cyclops.cyclopscore.client.gui.component.button.ButtonImage> - Parameters:
x- The button X position.y- The button Y position.- Returns:
- The gui button.
-
onClick
public void onClick(TerminalStorageTabIngredientComponentClient<T, ?> clientTab, TerminalStorageTabIngredientComponentCommon<T, ?> commomTab, org.cyclops.cyclopscore.client.gui.component.button.ButtonImage guiButton, int channel, int mouseButton) Description copied from interface:ITerminalButtonCallback for when the gui button has been clicked.- Specified by:
onClickin interfaceITerminalButton<TerminalStorageTabIngredientComponentClient<T,?>, TerminalStorageTabIngredientComponentCommon<T, ?>, org.cyclops.cyclopscore.client.gui.component.button.ButtonImage> - Parameters:
clientTab- The client tab in which the button was clicked.commomTab- The common tab in which the button was clicked.guiButton- The gui button.channel- The active channel.mouseButton- The mouse button that was used to click with.
-
getTranslationKey
- Specified by:
getTranslationKeyin interfaceITerminalButton<TerminalStorageTabIngredientComponentClient<T,?>, TerminalStorageTabIngredientComponentCommon<T, ?>, org.cyclops.cyclopscore.client.gui.component.button.ButtonImage> - Returns:
- The unlocalized name
-
getTooltip
public void getTooltip(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.TooltipFlag tooltipFlag, List<net.minecraft.network.chat.Component> lines) Description copied from interface:ITerminalButtonGet the tooltip of this sorter.- Specified by:
getTooltipin interfaceITerminalButton<TerminalStorageTabIngredientComponentClient<T,?>, TerminalStorageTabIngredientComponentCommon<T, ?>, org.cyclops.cyclopscore.client.gui.component.button.ButtonImage> - Parameters:
player- The player that is requesting the tooltip.tooltipFlag- The tooltip flag.lines- The tooltip lines.
-
getEffectiveFilter
public Predicate<TerminalStorageTabIngredientComponentClient.InstanceWithMetadata<T>> getEffectiveFilter()
-