Class PatternDetailsHelper

java.lang.Object
appeng.api.crafting.PatternDetailsHelper

public final class PatternDetailsHelper extends Object
  • Constructor Details

    • PatternDetailsHelper

      public PatternDetailsHelper()
  • Method Details

    • registerDecoder

      public static void registerDecoder(IPatternDetailsDecoder decoder)
    • isEncodedPattern

      public static boolean isEncodedPattern(net.minecraft.world.item.ItemStack stack)
    • decodePattern

      @Nullable public static IPatternDetails decodePattern(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level level)
    • decodePattern

      @Nullable public static IPatternDetails decodePattern(AEItemKey what, net.minecraft.world.level.Level level)
    • decodePattern

      @Nullable public static IPatternDetails decodePattern(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level level, boolean autoRecovery)
    • encodeProcessingPattern

      public static net.minecraft.world.item.ItemStack encodeProcessingPattern(GenericStack[] in, GenericStack[] out)
      Encodes a processing pattern which represents the ability to convert the given inputs into the given outputs using some process external to the ME system.
      Parameters:
      out - The first element is considered the primary output and must be present
      Returns:
      A new encoded pattern.
      Throws:
      IllegalArgumentException - If either in or out contain only empty ItemStacks, or no primary output
    • encodeCraftingPattern

      public static net.minecraft.world.item.ItemStack encodeCraftingPattern(net.minecraft.world.item.crafting.CraftingRecipe recipe, net.minecraft.world.item.ItemStack[] in, net.minecraft.world.item.ItemStack out, boolean allowSubstitutes, boolean allowFluidSubstitutes)
      Encodes a crafting pattern which represents a Vanilla crafting recipe.
      Parameters:
      recipe - The Vanilla crafting recipe to be encoded.
      in - The items in the crafting grid, which are used to determine what items are supplied from the ME system to craft using this pattern.
      out - What is to be expected as the result of this crafting operation by the ME system.
      allowSubstitutes - Controls whether the ME system will allow the use of equivalent items to craft this recipe.
      allowFluidSubstitutes - Controls whether the ME system will allow the use of equivalent fluids.
      Throws:
      IllegalArgumentException - If either in or out contain only empty ItemStacks.