Class SimplePocketCrafter<I extends net.minecraft.world.item.crafting.RecipeInput,R extends net.minecraft.world.item.crafting.Recipe<I>>
java.lang.Object
petrolpark.mc.library.core.world.item.crafting.pocket.crafter.SimplePocketCrafter<I,R>
- All Implemented Interfaces:
IPocketCrafter<R>
- Direct Known Subclasses:
SingleInputPocketCrafter
@ParametersAreNonnullByDefault
public abstract class SimplePocketCrafter<I extends net.minecraft.world.item.crafting.RecipeInput,R extends net.minecraft.world.item.crafting.Recipe<I>>
extends Object
implements IPocketCrafter<R>
-
Field Summary
Fields inherited from interface petrolpark.mc.library.core.world.item.crafting.pocket.crafter.IPocketCrafter
STREAM_CODEC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanCastRecipe(net.minecraft.world.item.crafting.Recipe<?> recipe) craft(IPocketCraftingContext context, boolean simulate, net.minecraft.world.item.crafting.RecipeHolder<? extends R> recipeHolder, List<IInterpretedSlot<?>> inputSlots, net.minecraft.world.inventory.Slot outputSlot) abstract IcreateRecipeInput(IPocketCraftingContext context, List<IInterpretedSlot<?>> slots) getRecipes(IPocketCraftingContext.Client context, List<IInterpretedSlot<?>> slots, PocketCrafting.SlotArrangement slotArrangement) protected final <R2 extends R>
net.minecraft.world.item.ItemStackgetResult(net.minecraft.core.HolderLookup.Provider registries, I input, net.minecraft.world.item.crafting.RecipeHolder<R2> recipeHolder) streamRecipesFor(IPocketCraftingContext context, net.minecraft.world.item.crafting.RecipeType<R2> type, I input) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface petrolpark.mc.library.core.world.item.crafting.pocket.crafter.IPocketCrafter
getDefaultToolStack, getName, getRecipeLength, getSlotInterpretations, sendPacket
-
Constructor Details
-
SimplePocketCrafter
public SimplePocketCrafter()
-
-
Method Details
-
streamRecipeTypes
-
createRecipeInput
@Nullable public abstract I createRecipeInput(IPocketCraftingContext context, List<IInterpretedSlot<?>> slots) -
canCastRecipe
public boolean canCastRecipe(net.minecraft.world.item.crafting.Recipe<?> recipe) - Specified by:
canCastRecipein interfaceIPocketCrafter<I extends net.minecraft.world.item.crafting.RecipeInput>
-
getRecipes
public List<net.minecraft.world.item.crafting.RecipeHolder<? extends R>> getRecipes(IPocketCraftingContext.Client context, List<IInterpretedSlot<?>> slots, PocketCrafting.SlotArrangement slotArrangement) - Specified by:
getRecipesin interfaceIPocketCrafter<I extends net.minecraft.world.item.crafting.RecipeInput>
-
craft
public PocketCrafting.Result craft(IPocketCraftingContext context, boolean simulate, net.minecraft.world.item.crafting.RecipeHolder<? extends R> recipeHolder, List<IInterpretedSlot<?>> inputSlots, @Nullable net.minecraft.world.inventory.Slot outputSlot) - Specified by:
craftin interfaceIPocketCrafter<I extends net.minecraft.world.item.crafting.RecipeInput>
-
streamRecipesFor
protected final <R2 extends R> Stream<net.minecraft.world.item.crafting.RecipeHolder<? extends R>> streamRecipesFor(IPocketCraftingContext context, net.minecraft.world.item.crafting.RecipeType<R2> type, I input) -
getResult
-