Class CraftingPattern
java.lang.Object
com.refinedmods.refinedstorage.apiimpl.autocrafting.CraftingPattern
- All Implemented Interfaces:
ICraftingPattern
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionCraftingPattern
(CraftingPatternContext context, boolean processing, boolean exact, net.minecraft.world.item.crafting.CraftingRecipe recipe, CraftingPatternInputs inputs, CraftingPatternOutputs outputs, AllowedTagList allowedTagList) -
Method Summary
Modifier and TypeMethodDescriptionboolean
net.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.ResourceLocation
net.minecraft.network.chat.Component
List<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.ItemStack
getOutput
(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.ItemStack
getStack()
int
hashCode()
boolean
boolean
isValid()
-
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:
getContainer
in interfaceICraftingPattern
- Returns:
- the
ICraftingPatternContainer
where the pattern is in
-
getStack
public net.minecraft.world.item.ItemStack getStack()- Specified by:
getStack
in interfaceICraftingPattern
- Returns:
- the crafting pattern stack
-
isValid
public boolean isValid()- Specified by:
isValid
in interfaceICraftingPattern
- Returns:
- true if the crafting pattern is valid, false otherwise
-
getErrorMessage
@Nullable public net.minecraft.network.chat.Component getErrorMessage()- Specified by:
getErrorMessage
in interfaceICraftingPattern
- 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 interfaceICraftingPattern
- Returns:
- true if the crafting pattern can be treated as a processing pattern, false otherwise
-
getInputs
- Specified by:
getInputs
in interfaceICraftingPattern
- Returns:
- the inputs per slot
-
getOutputs
public net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getOutputs()- Specified by:
getOutputs
in 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:
getOutput
in 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:
getByproducts
in 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:
getByproducts
in 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:
getFluidInputs
in interfaceICraftingPattern
- Returns:
- the fluid inputs per slot
-
getFluidOutputs
public net.minecraft.core.NonNullList<net.neoforged.neoforge.fluids.FluidStack> getFluidOutputs()- Specified by:
getFluidOutputs
in interfaceICraftingPattern
- Returns:
- the fluid outputs
-
getCraftingTaskFactoryId
public net.minecraft.resources.ResourceLocation getCraftingTaskFactoryId()- Specified by:
getCraftingTaskFactoryId
in 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()
-