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>
  • Constructor Details

    • SimplePocketCrafter

      public SimplePocketCrafter()
  • Method Details

    • streamRecipeTypes

      public abstract Stream<net.minecraft.world.item.crafting.RecipeType<? extends R>> 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:
      canCastRecipe in interface IPocketCrafter<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:
      getRecipes in interface IPocketCrafter<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:
      craft in interface IPocketCrafter<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

      protected final <R2 extends R> net.minecraft.world.item.ItemStack getResult(net.minecraft.core.HolderLookup.Provider registries, I input, net.minecraft.world.item.crafting.RecipeHolder<R2> recipeHolder)