• 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/capability/IIngredientComponentValueHandler.java
1
package org.cyclops.integrateddynamics.api.ingredient.capability;
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
@Deprecated // TODO: try to rm in next major, as we have IIngredientComponentHandler and IIngredientComponentHandlerRegistry that do the same
19
public interface IIngredientComponentValueHandler<VT extends IValueType<V>, V extends IValue, T, M> {
20

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

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

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

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

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

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