java.lang.Object
com.refinedmods.refinedstorage.apiimpl.autocrafting.CraftingPattern
All Implemented Interfaces:
ICraftingPattern

public class CraftingPattern extends Object implements ICraftingPattern
  • Constructor Details

  • Method Details

    • getAllowedTagList

      @Nullable public AllowedTagList getAllowedTagList()
    • getContainer

      public ICraftingPatternContainer getContainer()
      Specified by:
      getContainer in interface ICraftingPattern
      Returns:
      the ICraftingPatternContainer where the pattern is in
    • getStack

      public net.minecraft.world.item.ItemStack getStack()
      Specified by:
      getStack in interface ICraftingPattern
      Returns:
      the crafting pattern stack
    • isValid

      public boolean isValid()
      Specified by:
      isValid in interface ICraftingPattern
      Returns:
      true if the crafting pattern is valid, false otherwise
    • getErrorMessage

      @Nullable public net.minecraft.network.chat.Component getErrorMessage()
      Specified by:
      getErrorMessage in interface ICraftingPattern
      Returns:
      an error message when this pattern is not valid, or null if there's no message
    • isProcessing

      public boolean isProcessing()
      Specified by:
      isProcessing in interface ICraftingPattern
      Returns:
      true if the crafting pattern can be treated as a processing pattern, false otherwise
    • getInputs

      public List<net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack>> getInputs()
      Specified by:
      getInputs in interface ICraftingPattern
      Returns:
      the inputs per slot
    • getOutputs

      public net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getOutputs()
      Specified by:
      getOutputs in interface ICraftingPattern
      Returns:
      the outputs
    • getOutput

      public net.minecraft.world.item.ItemStack getOutput(net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> took, net.minecraft.core.RegistryAccess registryAccess)
      Specified by:
      getOutput in interface ICraftingPattern
      Parameters:
      took - the items took per slot
      registryAccess - the registry accessor
      Returns:
      the output based on the items took
    • getByproducts

      public net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getByproducts()
      Specified by:
      getByproducts in interface ICraftingPattern
      Returns:
      the byproducts
    • getByproducts

      public net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getByproducts(net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> took)
      Specified by:
      getByproducts in interface ICraftingPattern
      Parameters:
      took - the items took per slot
      Returns:
      the byproducts based on the items took
    • getFluidInputs

      public List<net.minecraft.core.NonNullList<net.neoforged.neoforge.fluids.FluidStack>> getFluidInputs()
      Specified by:
      getFluidInputs in interface ICraftingPattern
      Returns:
      the fluid inputs per slot
    • getFluidOutputs

      public net.minecraft.core.NonNullList<net.neoforged.neoforge.fluids.FluidStack> getFluidOutputs()
      Specified by:
      getFluidOutputs in interface ICraftingPattern
      Returns:
      the fluid outputs
    • getCraftingTaskFactoryId

      public net.minecraft.resources.ResourceLocation getCraftingTaskFactoryId()
      Specified by:
      getCraftingTaskFactoryId in interface ICraftingPattern
      Returns:
      the id of the factory that creates a crafting task for this pattern, as defined in the ICraftingTaskRegistry
    • equals

      public boolean equals(Object otherObj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object