Class CraftingPattern
java.lang.Object
com.refinedmods.refinedstorage.apiimpl.autocrafting.CraftingPattern
- All Implemented Interfaces:
ICraftingPattern
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionCraftingPattern(CraftingPatternContext context, boolean processing, boolean exact, net.minecraft.world.item.crafting.CraftingRecipe recipe, CraftingPatternInputs inputs, CraftingPatternOutputs outputs, AllowedTagList allowedTagList) -
Method Summary
Modifier and TypeMethodDescriptionbooleannet.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack>net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack>getByproducts(net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> took) net.minecraft.resources.ResourceLocationnet.minecraft.network.chat.ComponentList<net.minecraft.core.NonNullList<net.neoforged.neoforge.fluids.FluidStack>>net.minecraft.core.NonNullList<net.neoforged.neoforge.fluids.FluidStack>List<net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack>>net.minecraft.world.item.ItemStackgetOutput(net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> took, net.minecraft.core.RegistryAccess registryAccess) net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack>net.minecraft.world.item.ItemStackgetStack()inthashCode()booleanbooleanisValid()
-
Constructor Details
-
CraftingPattern
public CraftingPattern(CraftingPatternContext context, boolean processing, boolean exact, @Nullable net.minecraft.world.item.crafting.CraftingRecipe recipe, CraftingPatternInputs inputs, CraftingPatternOutputs outputs, @Nullable AllowedTagList allowedTagList)
-
-
Method Details
-
getAllowedTagList
-
getContainer
- Specified by:
getContainerin interfaceICraftingPattern- Returns:
- the
ICraftingPatternContainerwhere the pattern is in
-
getStack
public net.minecraft.world.item.ItemStack getStack()- Specified by:
getStackin interfaceICraftingPattern- Returns:
- the crafting pattern stack
-
isValid
public boolean isValid()- Specified by:
isValidin interfaceICraftingPattern- Returns:
- true if the crafting pattern is valid, false otherwise
-
getErrorMessage
@Nullable public net.minecraft.network.chat.Component getErrorMessage()- Specified by:
getErrorMessagein interfaceICraftingPattern- Returns:
- an error message when this pattern is not valid, or null if there's no message
-
isProcessing
public boolean isProcessing()- Specified by:
isProcessingin interfaceICraftingPattern- Returns:
- true if the crafting pattern can be treated as a processing pattern, false otherwise
-
getInputs
- Specified by:
getInputsin interfaceICraftingPattern- Returns:
- the inputs per slot
-
getOutputs
public net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getOutputs()- Specified by:
getOutputsin interfaceICraftingPattern- 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:
getOutputin interfaceICraftingPattern- Parameters:
took- the items took per slotregistryAccess- 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:
getByproductsin interfaceICraftingPattern- 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:
getByproductsin interfaceICraftingPattern- 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:
getFluidInputsin interfaceICraftingPattern- Returns:
- the fluid inputs per slot
-
getFluidOutputs
public net.minecraft.core.NonNullList<net.neoforged.neoforge.fluids.FluidStack> getFluidOutputs()- Specified by:
getFluidOutputsin interfaceICraftingPattern- Returns:
- the fluid outputs
-
getCraftingTaskFactoryId
public net.minecraft.resources.ResourceLocation getCraftingTaskFactoryId()- Specified by:
getCraftingTaskFactoryIdin interfaceICraftingPattern- Returns:
- the id of the factory that creates a crafting task for this pattern, as defined in the
ICraftingTaskRegistry
-
equals
-
hashCode
public int hashCode()
-