Class RecyclingManager

java.lang.Object
com.petrolpark.core.recipe.recycling.RecyclingManager

public class RecyclingManager extends Object
  • Field Details

    • INGREDIENT_INVERSES

      protected static final Map<net.minecraft.world.item.crafting.Ingredient,RecyclingOutputs> INGREDIENT_INVERSES
    • ITEM_RECYCLINGS

      protected static final Map<net.minecraft.world.item.Item,RecyclingOutputs> ITEM_RECYCLINGS
    • OUTPUT_MODIFIERS

      protected static final Set<RecyclingOutputsModifier> OUTPUT_MODIFIERS
  • Constructor Details

    • RecyclingManager

      public RecyclingManager()
  • Method Details

    • registerModifier

      public static final void registerModifier(RecyclingOutputsModifier recyclingOutputsModifier)
    • loadIngredientInverses

      public static final void loadIngredientInverses(net.minecraft.world.item.crafting.RecipeManager recipeManager)
    • getInverse

      public static final RecyclingOutputs getInverse(net.minecraft.world.item.crafting.Ingredient ingredient)
    • getInverseRecipeRecyclingOutputs

      public static final RecyclingOutputs getInverseRecipeRecyclingOutputs(net.minecraft.world.level.Level level, net.minecraft.world.item.Item item)
      Get the RecyclingOutputs of the Item, based on the Recipe used to craft it.
      Parameters:
      level -
      item -
      Returns:
      A RecyclingOutputs, or RecyclingOutputs.empty() if there are multiple different Recipes for crafting this Item
    • getRawRecyclingOutputs

      public static final RecyclingOutputs getRawRecyclingOutputs(net.minecraft.world.level.Level level, net.minecraft.world.item.ItemStack stack)
      Get the RecyclingOutputs from recycling this Stack, before adjusting for the size of the Stack and before applying any RecyclingOutputsModifiers.
      Parameters:
      level -
      stack - Count is ignored
      Returns:
      Copy of a RecyclingOutputs, safe to modify
      See Also:
    • getRecyclingOutputs

      public static final RecyclingOutputs getRecyclingOutputs(net.minecraft.world.level.Level level, net.minecraft.world.item.ItemStack stack)
    • onRecipesUpdated

      public static final void onRecipesUpdated(net.neoforged.neoforge.client.event.RecipesUpdatedEvent event)