Class WoodCraftingShapedRecipe

java.lang.Object
net.minecraft.world.item.crafting.ShapedRecipe
com.petrolpark.core.item.wooden.WoodCraftingShapedRecipe
All Implemented Interfaces:
IRecyclableRecipe, net.minecraft.world.item.crafting.CraftingRecipe, net.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.CraftingInput>

public class WoodCraftingShapedRecipe extends net.minecraft.world.item.crafting.ShapedRecipe implements IRecyclableRecipe
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraft.world.item.crafting.Ingredient
     
    protected static final Map<Character,net.minecraft.world.item.crafting.Ingredient>
     
    static final net.minecraft.world.item.crafting.Ingredient
     
    static final com.mojang.serialization.MapCodec<WoodCraftingShapedRecipe>
     
    static final net.minecraft.world.item.crafting.Ingredient
     
    static final net.minecraft.world.item.crafting.Ingredient
     
    static final net.minecraft.world.item.crafting.Ingredient
     
    static final net.minecraft.world.item.crafting.Ingredient
     
    static final net.minecraft.world.item.crafting.Ingredient
     
    static final net.minecraft.world.item.crafting.Ingredient
     
    static final com.mojang.serialization.MapCodec<net.minecraft.world.item.crafting.ShapedRecipePattern>
     
    static final net.minecraft.world.item.crafting.Ingredient
     
    static final net.minecraft.world.item.crafting.Ingredient
     
    static final net.minecraft.world.item.crafting.Ingredient
     
    static final net.minecraft.world.item.crafting.Ingredient
     
    static final net.minecraft.world.item.crafting.Ingredient
     
    static final net.minecraft.world.item.crafting.Ingredient
     
    static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,WoodCraftingShapedRecipe>
     
    static final net.minecraft.world.item.crafting.Ingredient
     
    static final net.minecraft.world.item.crafting.Ingredient
     
    protected static final Map<net.minecraft.world.item.crafting.Ingredient,Function<? super net.minecraft.world.item.ItemStack,WoodHelper.Wood>>
     

    Fields inherited from class net.minecraft.world.item.crafting.ShapedRecipe

    pattern, result

    Fields inherited from interface net.minecraft.world.item.crafting.Recipe

    CONDITIONAL_CODEC
  • Constructor Summary

    Constructors
    Constructor
    Description
    WoodCraftingShapedRecipe(String group, net.minecraft.world.item.crafting.CraftingBookCategory category, net.minecraft.world.item.crafting.ShapedRecipePattern pattern, net.minecraft.world.item.ItemStack result, boolean showNotification)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.world.item.ItemStack
    assemble(net.minecraft.world.item.crafting.CraftingInput input, boolean mirrored)
     
    net.minecraft.world.item.ItemStack
    assemble(net.minecraft.world.item.crafting.CraftingInput input, net.minecraft.core.HolderLookup.Provider registries)
     
    net.minecraft.world.item.crafting.ShapedRecipePattern
     
    getRecyclingOutputs(net.minecraft.world.level.Level level, net.minecraft.world.item.ItemStack stack)
    Get (optionally) the Items that would have been used to craft the given Item Stack with this Recipe, wrapped as RecyclingOutputs.
    net.minecraft.world.item.ItemStack
     
     
    static final WoodHelper.Wood
    getWood(net.minecraft.world.item.ItemStack stack)
     
    boolean
    matches(net.minecraft.world.item.crafting.CraftingInput input, net.minecraft.world.level.Level level)
     
    static final com.mojang.serialization.DataResult<net.minecraft.world.item.crafting.ShapedRecipePattern.Data>
    packPattern(net.minecraft.world.item.crafting.ShapedRecipePattern pattern)
     
    static final void
    register(Character character, net.minecraft.world.item.crafting.Ingredient ingredient, Function<? super net.minecraft.world.item.ItemStack,WoodHelper.Wood> woodGetter)
     
    Stream<net.minecraft.world.item.crafting.Ingredient>
     
    Stream<net.minecraft.world.item.crafting.Ingredient>
    streamSpecificIngredientsFor(net.minecraft.world.item.ItemStack result)
     
    Stream<net.minecraft.world.item.ItemStack>
     
    static final com.mojang.serialization.DataResult<net.minecraft.world.item.crafting.ShapedRecipePattern>
    unpackPatternData(net.minecraft.world.item.crafting.ShapedRecipePattern.Data patternData)
     
    static final Set<Map.Entry<net.minecraft.world.item.crafting.Ingredient,Function<? super net.minecraft.world.item.ItemStack,WoodHelper.Wood>>>
     

    Methods inherited from class net.minecraft.world.item.crafting.ShapedRecipe

    canCraftInDimensions, category, getGroup, getHeight, getIngredients, getResultItem, getWidth, isIncomplete, showNotification

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.world.item.crafting.CraftingRecipe

    getType

    Methods inherited from interface net.minecraft.world.item.crafting.Recipe

    getRemainingItems, getToastSymbol, isSpecial
  • Field Details

    • PLANKS_INGREDIENT

      public static final net.minecraft.world.item.crafting.Ingredient PLANKS_INGREDIENT
    • SLAB_INGREDIENT

      public static final net.minecraft.world.item.crafting.Ingredient SLAB_INGREDIENT
    • STAIRS_INGREDIENT

      public static final net.minecraft.world.item.crafting.Ingredient STAIRS_INGREDIENT
    • FENCE_INGREDIENT

      public static final net.minecraft.world.item.crafting.Ingredient FENCE_INGREDIENT
    • FENCE_GATE_INGREDIENT

      public static final net.minecraft.world.item.crafting.Ingredient FENCE_GATE_INGREDIENT
    • BUTTON_INGREDIENT

      public static final net.minecraft.world.item.crafting.Ingredient BUTTON_INGREDIENT
    • LOG_INGREDIENT

      public static final net.minecraft.world.item.crafting.Ingredient LOG_INGREDIENT
    • STRIPPED_LOG_INGREDIENT

      public static final net.minecraft.world.item.crafting.Ingredient STRIPPED_LOG_INGREDIENT
    • LEAVES_INGREDIENT

      public static final net.minecraft.world.item.crafting.Ingredient LEAVES_INGREDIENT
    • SAPLING_INGREDIENT

      public static final net.minecraft.world.item.crafting.Ingredient SAPLING_INGREDIENT
    • PRESSURE_PLATE_INGREDIENT

      public static final net.minecraft.world.item.crafting.Ingredient PRESSURE_PLATE_INGREDIENT
    • DOOR_INGREDIENT

      public static final net.minecraft.world.item.crafting.Ingredient DOOR_INGREDIENT
    • TRAPDOOR_INGREDIENT

      public static final net.minecraft.world.item.crafting.Ingredient TRAPDOOR_INGREDIENT
    • SIGN_INGREDIENT

      public static final net.minecraft.world.item.crafting.Ingredient SIGN_INGREDIENT
    • HANGING_SIGN_INGREDIENT

      public static final net.minecraft.world.item.crafting.Ingredient HANGING_SIGN_INGREDIENT
    • BOAT_INGREDIENT

      public static final net.minecraft.world.item.crafting.Ingredient BOAT_INGREDIENT
    • BUILT_IN_INGREDIENTS

      protected static final Map<Character,net.minecraft.world.item.crafting.Ingredient> BUILT_IN_INGREDIENTS
    • WOOD_GETTERS

      protected static final Map<net.minecraft.world.item.crafting.Ingredient,Function<? super net.minecraft.world.item.ItemStack,WoodHelper.Wood>> WOOD_GETTERS
    • PATTERN_MAP_CODEC

      public static final com.mojang.serialization.MapCodec<net.minecraft.world.item.crafting.ShapedRecipePattern> PATTERN_MAP_CODEC
    • CODEC

      public static final com.mojang.serialization.MapCodec<WoodCraftingShapedRecipe> CODEC
    • STREAM_CODEC

      public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,WoodCraftingShapedRecipe> STREAM_CODEC
  • Constructor Details

    • WoodCraftingShapedRecipe

      public WoodCraftingShapedRecipe(String group, net.minecraft.world.item.crafting.CraftingBookCategory category, net.minecraft.world.item.crafting.ShapedRecipePattern pattern, net.minecraft.world.item.ItemStack result, boolean showNotification)
  • Method Details

    • woodGetterEntries

      public static final Set<Map.Entry<net.minecraft.world.item.crafting.Ingredient,Function<? super net.minecraft.world.item.ItemStack,WoodHelper.Wood>>> woodGetterEntries()
    • register

      public static final void register(Character character, net.minecraft.world.item.crafting.Ingredient ingredient, Function<? super net.minecraft.world.item.ItemStack,WoodHelper.Wood> woodGetter)
    • getWood

      @Nullable public static final WoodHelper.Wood getWood(net.minecraft.world.item.ItemStack stack)
    • getPattern

      public net.minecraft.world.item.crafting.ShapedRecipePattern getPattern()
    • unpackPatternData

      public static final com.mojang.serialization.DataResult<net.minecraft.world.item.crafting.ShapedRecipePattern> unpackPatternData(net.minecraft.world.item.crafting.ShapedRecipePattern.Data patternData)
    • packPattern

      public static final com.mojang.serialization.DataResult<net.minecraft.world.item.crafting.ShapedRecipePattern.Data> packPattern(net.minecraft.world.item.crafting.ShapedRecipePattern pattern)
    • matches

      public boolean matches(@Nonnull net.minecraft.world.item.crafting.CraftingInput input, @Nonnull net.minecraft.world.level.Level level)
      Specified by:
      matches in interface net.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.CraftingInput>
      Overrides:
      matches in class net.minecraft.world.item.crafting.ShapedRecipe
    • assemble

      public net.minecraft.world.item.ItemStack assemble(@Nonnull net.minecraft.world.item.crafting.CraftingInput input, @Nonnull net.minecraft.core.HolderLookup.Provider registries)
      Specified by:
      assemble in interface net.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.CraftingInput>
      Overrides:
      assemble in class net.minecraft.world.item.crafting.ShapedRecipe
    • getResult

      public net.minecraft.world.item.ItemStack getResult(WoodHelper.Wood wood)
    • assemble

      public net.minecraft.world.item.ItemStack assemble(@Nonnull net.minecraft.world.item.crafting.CraftingInput input, boolean mirrored)
    • streamSpecificIngredientsFor

      public Stream<net.minecraft.world.item.crafting.Ingredient> streamSpecificIngredientsFor(net.minecraft.world.item.ItemStack result)
    • streamSpecificIngredientsFor

      public Stream<net.minecraft.world.item.crafting.Ingredient> streamSpecificIngredientsFor(WoodHelper.Wood wood)
    • streamSpecificStacksFor

      public Stream<net.minecraft.world.item.ItemStack> streamSpecificStacksFor(WoodHelper.Wood wood)
    • getRecyclingOutputs

      public Optional<RecyclingOutputs> getRecyclingOutputs(net.minecraft.world.level.Level level, net.minecraft.world.item.ItemStack stack)
      Description copied from interface: IRecyclableRecipe
      Get (optionally) the Items that would have been used to craft the given Item Stack with this Recipe, wrapped as RecyclingOutputs. This method should not consider the size of this Item Stack (which should always be 1) or replicate the effects of any RecyclingOutputsModifiers as these will be applied separately.
      Specified by:
      getRecyclingOutputs in interface IRecyclableRecipe
      Parameters:
      level -
      stack -
      Returns:
      Optional containing the RecyclingOutputs (possibly empty itself) for recycling the given Item Stack as the inverse of this Recipe, or an empty Optional if that Item Stack could never be produced by this Recipe and the recycling should pass to the default handling
    • getSerializer

      public WoodCraftingShapedRecipe.Serializer getSerializer()
      Specified by:
      getSerializer in interface net.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.CraftingInput>
      Overrides:
      getSerializer in class net.minecraft.world.item.crafting.ShapedRecipe