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

CyclopsMC / IntegratedDynamics / 20210191346

14 Dec 2025 03:32PM UTC coverage: 19.514% (-33.5%) from 53.061%
20210191346

push

github

rubensworks
Remove deprecations

663 of 8728 branches covered (7.6%)

Branch coverage included in aggregate %.

6786 of 29445 relevant lines covered (23.05%)

1.09 hits per line

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

0.0
/src/main/java/org/cyclops/integrateddynamics/api/ingredient/IIngredientComponentHandler.java
1
package org.cyclops.integrateddynamics.api.ingredient;
2

3
import net.minecraft.network.chat.Component;
4
import org.cyclops.commoncapabilities.api.ingredient.IngredientComponent;
5
import org.cyclops.integrateddynamics.api.evaluate.variable.IValue;
6
import org.cyclops.integrateddynamics.api.evaluate.variable.IValueType;
7

8
import javax.annotation.Nullable;
9

10
/**
11
 * Handles the translation between {@link IngredientComponent} instances and {@link IValue}.
12
 * @param <VT> The value type.
13
 * @param <V> The value.
14
 * @param <T> The instance type.
15
 * @param <M> The matching condition parameter.
16
 * @author rubensworks
17
 */
18
public interface IIngredientComponentHandler<VT extends IValueType<V>, V extends IValue, T, M> {
19

20
    /**
21
     * @return The value type with which the component should be handled.
22
     */
23
    public VT getValueType();
24

25
    /**
26
     * @return The recipe component.
27
     */
28
    public IngredientComponent<T, M> getComponent();
29

30
    /**
31
     * Convert an instance to a value.
32
     * @param instance A recipe component instance.
33
     * @return A value.
34
     */
35
    public V toValue(@Nullable T instance);
36

37
    /**
38
     * Convert a value to an instance.
39
     * @param value A value.
40
     * @return A recipe component instance.
41
     */
42
    @Nullable
43
    public T toInstance(V value);
44

45
    /**
46
     * Convert the given list of values to a compact string.
47
     * To be used in things like tooltips.
48
     * @param ingredientValue A list of ingredient values.
49
     * @return A compact string representation.
50
     */
51
    default public Component toCompactString(V ingredientValue) {
52
        return getValueType().toCompactString(ingredientValue);
×
53
    }
54

55
}
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

© 2026 Coveralls, Inc