mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-19 06:53:42 +01:00
213b504854
- Reworked and cleaned up Create's ProcessingRecipes - Prepared ProcessingRecipes for fluid ingredients and outputs - Added datagen infrastructure to ProcessingRecipes - Migrated all hand-written ProcessingRecipes to generated - Removed scrollinput on mixers - Fixed recipe lookup cache not invalidating on datapack reload - Removed "catalyst" ingredients
52 lines
1.5 KiB
Java
52 lines
1.5 KiB
Java
package com.simibubi.create.compat.jei;
|
|
|
|
import javax.annotation.ParametersAreNonnullByDefault;
|
|
|
|
import com.simibubi.create.AllRecipeTypes;
|
|
import com.simibubi.create.Create;
|
|
import com.simibubi.create.content.contraptions.processing.ProcessingRecipe;
|
|
import com.simibubi.create.content.contraptions.processing.ProcessingRecipeBuilder;
|
|
import com.simibubi.create.content.contraptions.processing.ProcessingRecipeBuilder.ProcessingRecipeParams;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
import net.minecraft.item.crafting.Ingredient;
|
|
import net.minecraft.util.ResourceLocation;
|
|
import net.minecraft.world.World;
|
|
import net.minecraftforge.items.wrapper.RecipeWrapper;
|
|
|
|
/**
|
|
* Helper recipe type for displaying an item relationship in JEI
|
|
*/
|
|
@ParametersAreNonnullByDefault
|
|
public class ConversionRecipe extends ProcessingRecipe<RecipeWrapper> {
|
|
|
|
static int counter = 0;
|
|
|
|
public static ConversionRecipe create(ItemStack from, ItemStack to) {
|
|
ResourceLocation recipeId = Create.asResource("conversion_" + counter++);
|
|
return new ProcessingRecipeBuilder<>(ConversionRecipe::new, recipeId)
|
|
.withItemIngredients(Ingredient.fromStacks(from))
|
|
.withSingleItemOutput(to)
|
|
.build();
|
|
}
|
|
|
|
public ConversionRecipe(ProcessingRecipeParams params) {
|
|
super(AllRecipeTypes.CONVERSION, params);
|
|
}
|
|
|
|
@Override
|
|
public boolean matches(RecipeWrapper inv, World worldIn) {
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
protected int getMaxInputCount() {
|
|
return 1;
|
|
}
|
|
|
|
@Override
|
|
protected int getMaxOutputCount() {
|
|
return 1;
|
|
}
|
|
|
|
}
|