• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

CyclopsMC / IntegratedCrafting / #479011834

31 Dec 2025 02:03PM UTC coverage: 23.802% (-1.1%) from 24.876%
#479011834

push

github

rubensworks
Fix incorrect commoncapabilities version

755 of 3172 relevant lines covered (23.8%)

0.24 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/main/java/org/cyclops/integratedcrafting/api/crafting/ICraftingInterface.java
1
package org.cyclops.integratedcrafting.api.crafting;
2

3
import org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeDefinition;
4
import org.cyclops.commoncapabilities.api.ingredient.IPrototypedIngredient;
5
import org.cyclops.commoncapabilities.api.ingredient.IngredientComponent;
6
import org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorage;
7
import org.cyclops.integratedcrafting.api.network.ICraftingNetwork;
8
import org.cyclops.integrateddynamics.api.part.PrioritizedPartPos;
9

10
import java.util.*;
11
import java.util.function.Function;
12

13
/**
14
 * A handler for invoking crafting recipes.
15
 * @author rubensworks
16
 */
17
public interface ICraftingInterface {
18

19
    /**
20
     * @return The collection of recipes that is exposed by this crafting interface.
21
     */
22
    public Collection<IRecipeDefinition> getRecipes();
23

24
    /**
25
     * @return If this crafting interface can currently accept crafting jobs.
26
     */
27
    public boolean canScheduleCraftingJobs();
28

29
    /**
30
     * Add the given crafting job to the list of crafting jobs.
31
     * @param craftingJob The crafting job.
32
     */
33
    public void scheduleCraftingJob(CraftingJob craftingJob);
34

35
    /**
36
     * Extract the required ingredients from storage and store them in the job.
37
     * @param craftingJob The crafting job.
38
     * @param storageGetter The storage getter.
39
     */
40
    public void fillCraftingJobBufferFromStorage(CraftingJob craftingJob, Function<IngredientComponent<?, ?>, IIngredientComponentStorage> storageGetter);
41

42
    /**
43
     * @return Get the number of scheduled and running crafting jobs in this interface.
44
     */
45
    public int getCraftingJobsCount();
46

47
    /**
48
     * @return Get the scheduled and running crafting jobs in this interface.
49
     */
50
    public Iterator<CraftingJob> getCraftingJobs();
51

52
    /**
53
     * Get the pending outputs for the given crafting job,
54
     * where the list indicates the different entries running in parallel.
55
     * @param craftingJobId A crafting job id.
56
     * @return A collection of all pending prototype-based ingredients.
57
     */
58
    public List<Map<IngredientComponent<?, ?>, List<IPrototypedIngredient<?, ?>>>> getPendingCraftingJobOutputs(int craftingJobId);
59

60
    /**
61
     * Get the status for the given crafting job.
62
     * @param network The network.
63
     * @param channel The channel.
64
     * @param craftingJobId A crafting job id.
65
     * @return The crafting status.
66
     */
67
    public CraftingJobStatus getCraftingJobStatus(ICraftingNetwork network, int channel, int craftingJobId);
68

69
    /**
70
     * Cancel the given crafting job.
71
     *
72
     * Note: this should not be called directly unless you know what you are doing!
73
     * Instead, you should call {@link ICraftingNetwork#cancelCraftingJob(int, int)}.
74
     *
75
     * @param channel The channel.
76
     * @param craftingJobId A crafting job id.
77
     */
78
    public void cancelCraftingJob(int channel, int craftingJobId);
79

80
    /**
81
     * @return The prioritized position of this interface.
82
     */
83
    public PrioritizedPartPos getPosition();
84

85
    public static Comparator<ICraftingInterface> createComparator() {
86
        return Comparator.comparing(ICraftingInterface::getPosition);
×
87
    }
88
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc