Add some javadoc, add container to callback
This commit is contained in:
parent
c6954add09
commit
66a7c382cd
4 changed files with 28 additions and 11 deletions
|
@ -1,9 +1,18 @@
|
|||
package dev.zontreck.libzontreck.chestgui;
|
||||
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraftforge.items.ItemStackHandler;
|
||||
|
||||
/**
|
||||
* This should be used in place of Runnable for ChestGUI
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface IChestGUIButtonCallback
|
||||
{
|
||||
void run(ItemStack stack);
|
||||
/**
|
||||
* A callback function that when invoked will pass the ChestGUI ItemStack
|
||||
* @param stack A temporary itemstack that is used for the ChestGUI
|
||||
* @param container The container object for manipulating other items when this is invoked
|
||||
*/
|
||||
void run(ItemStack stack, ItemStackHandler container);
|
||||
}
|
||||
|
|
Reference in a new issue