Class RecyclingManager
java.lang.Object
com.petrolpark.core.recipe.recycling.RecyclingManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Map<net.minecraft.world.item.crafting.Ingredient, RecyclingOutputs> protected static final Map<net.minecraft.world.item.Item, RecyclingOutputs> protected static final Set<RecyclingOutputsModifier> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final RecyclingOutputsgetInverse(net.minecraft.world.item.crafting.Ingredient ingredient) static final RecyclingOutputsgetInverseRecipeRecyclingOutputs(net.minecraft.world.level.Level level, net.minecraft.world.item.Item item) Get theRecyclingOutputsof the Item, based on the Recipe used to craft it.static final RecyclingOutputsgetRawRecyclingOutputs(net.minecraft.world.level.Level level, net.minecraft.world.item.ItemStack stack) Get theRecyclingOutputs from recycling this Stack, before adjusting for the size of the Stack and before applying anyRecyclingOutputsModifiers.static final RecyclingOutputsgetRecyclingOutputs(net.minecraft.world.level.Level level, net.minecraft.world.item.ItemStack stack) static final voidloadIngredientInverses(net.minecraft.world.item.crafting.RecipeManager recipeManager) static final voidonRecipesUpdated(net.neoforged.neoforge.client.event.RecipesUpdatedEvent event) static final voidregisterModifier(RecyclingOutputsModifier recyclingOutputsModifier)
-
Field Details
-
INGREDIENT_INVERSES
protected static final Map<net.minecraft.world.item.crafting.Ingredient,RecyclingOutputs> INGREDIENT_INVERSES -
ITEM_RECYCLINGS
-
OUTPUT_MODIFIERS
-
-
Constructor Details
-
RecyclingManager
public RecyclingManager()
-
-
Method Details
-
registerModifier
-
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 theRecyclingOutputsof the Item, based on the Recipe used to craft it.- Parameters:
level-item-- Returns:
- A
RecyclingOutputs, orRecyclingOutputs.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 theRecyclingOutputs from recycling this Stack, before adjusting for the size of the Stack and before applying anyRecyclingOutputsModifiers.- Parameters:
level-stack-Countis 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)
-