use of slimeknights.tconstruct.library.recipe.melting.MeltingRecipe in project TinkersConstruct by SlimeKnights.
the class JEIPlugin method registerRecipes.
@Override
public void registerRecipes(IRecipeRegistration register) {
assert Minecraft.getInstance().level != null;
RecipeManager manager = Minecraft.getInstance().level.getRecipeManager();
// casting
List<IDisplayableCastingRecipe> castingBasinRecipes = RecipeHelper.getJEIRecipes(manager, RecipeTypes.CASTING_BASIN, IDisplayableCastingRecipe.class);
register.addRecipes(castingBasinRecipes, TConstructRecipeCategoryUid.castingBasin);
List<IDisplayableCastingRecipe> castingTableRecipes = RecipeHelper.getJEIRecipes(manager, RecipeTypes.CASTING_TABLE, IDisplayableCastingRecipe.class);
register.addRecipes(castingTableRecipes, TConstructRecipeCategoryUid.castingTable);
// melting
List<MeltingRecipe> meltingRecipes = RecipeHelper.getJEIRecipes(manager, RecipeTypes.MELTING, MeltingRecipe.class);
register.addRecipes(meltingRecipes, TConstructRecipeCategoryUid.melting);
register.addRecipes(meltingRecipes, TConstructRecipeCategoryUid.foundry);
MeltingFuelHandler.setMeltngFuels(RecipeHelper.getRecipes(manager, RecipeTypes.FUEL, MeltingFuel.class));
// entity melting
List<EntityMeltingRecipe> entityMeltingRecipes = RecipeHelper.getJEIRecipes(manager, RecipeTypes.ENTITY_MELTING, EntityMeltingRecipe.class);
// generate a "default" recipe for all other entity types
entityMeltingRecipes.add(new DefaultEntityMeltingRecipe(entityMeltingRecipes));
register.addRecipes(entityMeltingRecipes, TConstructRecipeCategoryUid.entityMelting);
// alloying
List<AlloyRecipe> alloyRecipes = RecipeHelper.getJEIRecipes(manager, RecipeTypes.ALLOYING, AlloyRecipe.class);
register.addRecipes(alloyRecipes, TConstructRecipeCategoryUid.alloy);
// molding
List<MoldingRecipe> moldingRecipes = ImmutableList.<MoldingRecipe>builder().addAll(RecipeHelper.getJEIRecipes(manager, RecipeTypes.MOLDING_TABLE, MoldingRecipe.class)).addAll(RecipeHelper.getJEIRecipes(manager, RecipeTypes.MOLDING_BASIN, MoldingRecipe.class)).build();
register.addRecipes(moldingRecipes, TConstructRecipeCategoryUid.molding);
// modifiers
List<IDisplayModifierRecipe> modifierRecipes = RecipeHelper.getJEIRecipes(manager, RecipeTypes.TINKER_STATION, IDisplayModifierRecipe.class).stream().sorted((r1, r2) -> {
SlotType t1 = r1.getSlotType();
SlotType t2 = r2.getSlotType();
String n1 = t1 == null ? "zzzzzzzzzz" : t1.getName();
String n2 = t2 == null ? "zzzzzzzzzz" : t2.getName();
return n1.compareTo(n2);
}).collect(Collectors.toList());
register.addRecipes(modifierRecipes, TConstructRecipeCategoryUid.modifiers);
// beheading
List<SeveringRecipe> severingRecipes = RecipeHelper.getJEIRecipes(manager, RecipeTypes.SEVERING, SeveringRecipe.class);
register.addRecipes(severingRecipes, TConstructRecipeCategoryUid.severing);
// part builder
List<MaterialRecipe> materialRecipes = RecipeHelper.getRecipes(manager, RecipeTypes.MATERIAL, MaterialRecipe.class);
MaterialItemList.setRecipes(materialRecipes);
List<IDisplayPartBuilderRecipe> partRecipes = RecipeHelper.getJEIRecipes(manager, RecipeTypes.PART_BUILDER, IDisplayPartBuilderRecipe.class);
register.addRecipes(partRecipes, TConstructRecipeCategoryUid.partBuilder);
}
Aggregations