Interface ICraftingGridBehavior
- All Known Implementing Classes:
CraftingGridBehavior
public interface ICraftingGridBehavior
Defines default behavior of crafting grids.
-
Method Summary
Modifier and TypeMethodDescriptionvoidonCrafted(INetworkAwareGrid grid, net.minecraft.world.item.crafting.CraftingRecipe recipe, net.minecraft.world.entity.player.Player player, IStackList<net.minecraft.world.item.ItemStack> availableItems, IStackList<net.minecraft.world.item.ItemStack> usedItems) Logic for regular crafting.voidonCraftedShift(INetworkAwareGrid grid, net.minecraft.world.entity.player.Player player) Logic for crafting with shift click (mass crafting).voidonRecipeTransfer(INetworkAwareGrid grid, net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack[][] recipe) Logic for when a recipe is transferred to the grid.
-
Method Details
-
onCrafted
void onCrafted(INetworkAwareGrid grid, net.minecraft.world.item.crafting.CraftingRecipe recipe, net.minecraft.world.entity.player.Player player, @Nullable IStackList<net.minecraft.world.item.ItemStack> availableItems, @Nullable IStackList<net.minecraft.world.item.ItemStack> usedItems) Logic for regular crafting.- Parameters:
grid- the gridrecipe- the recipeplayer- the playeravailableItems- the items available for shift craftingusedItems- the items used by shift crafting
-
onCraftedShift
Logic for crafting with shift click (mass crafting).- Parameters:
grid- the gridplayer- the player
-
onRecipeTransfer
void onRecipeTransfer(INetworkAwareGrid grid, net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack[][] recipe) Logic for when a recipe is transferred to the grid.- Parameters:
grid- the gridplayer- the playerrecipe- the recipe
-