Interface ICraftingGridBehavior

All Known Implementing Classes:
CraftingGridBehavior

public interface ICraftingGridBehavior
Defines default behavior of crafting grids.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onCrafted(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.
    void
    onCraftedShift(INetworkAwareGrid grid, net.minecraft.world.entity.player.Player player)
    Logic for crafting with shift click (mass crafting).
    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.
  • 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 grid
      recipe - the recipe
      player - the player
      availableItems - the items available for shift crafting
      usedItems - the items used by shift crafting
    • onCraftedShift

      void onCraftedShift(INetworkAwareGrid grid, net.minecraft.world.entity.player.Player player)
      Logic for crafting with shift click (mass crafting).
      Parameters:
      grid - the grid
      player - 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 grid
      player - the player
      recipe - the recipe