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

CyclopsMC / IntegratedDynamics / 16552051255

27 Jul 2025 01:58PM UTC coverage: 53.206% (+8.0%) from 45.161%
16552051255

push

github

rubensworks
Resolve minor TODOs

2888 of 8740 branches covered (33.04%)

Branch coverage included in aggregate %.

17341 of 29280 relevant lines covered (59.22%)

3.08 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/evaluate/variable/IValueTypeListProxyFactoryTypeRegistry.java
1
package org.cyclops.integrateddynamics.api.evaluate.variable;
2

3
import net.minecraft.resources.ResourceLocation;
4
import net.minecraft.world.level.storage.ValueInput;
5
import net.minecraft.world.level.storage.ValueOutput;
6
import org.cyclops.cyclopscore.init.IRegistry;
7

8
/**
9
 * Registry for list value type proxies.
10
 * @author rubensworks
11
 */
12
public interface IValueTypeListProxyFactoryTypeRegistry extends IRegistry {
13

14
    /**
15
     * Register a proxy factory by name.
16
     * @param proxyFactory The proxy factory.
17
     * @param <T> The list element type value type.
18
     * @param <V> The list element type.
19
     * @param <P> The proxy type.
20
     * @param <F> The factory type.
21
     * @return The registered instance.
22
     */
23
    public <T extends IValueType<V>, V extends IValue, P extends IValueTypeListProxy<T, V>, F extends IProxyFactory<T, V, P>> F register(F proxyFactory);
24

25
    /**
26
     * Get a proxy factory by name
27
     * @param <T> The list element type value type.
28
     * @param <V> The list element type.
29
     * @param <P> The proxy type.
30
     * @param name The name.
31
     * @return The corresponding instance.
32
     */
33
    public <T extends IValueType<V>, V extends IValue, P extends IValueTypeListProxy<T, V>> IProxyFactory<T, V, P> getFactory(ResourceLocation name);
34

35
    /**
36
     * Serialize the given list proxy.
37
     *
38
     * @param <T>         The list element type value type.
39
     * @param <V>         The list element type.
40
     * @param <P>         The proxy type.
41
     * @param valueOutput The value to output to.
42
     * @param proxy       The proxy to serialize.
43
     * @throws SerializationException If something goes wrong while serializing.
44
     */
45
    public <T extends IValueType<V>, V extends IValue, P extends IValueTypeListProxy<T, V>> void serialize(ValueOutput valueOutput, P proxy) throws SerializationException;
46

47
    /**
48
     * Deserialize the given serialized list proxy to a list proxy instance.
49
     *
50
     * @param <T>        The list element type value type.
51
     * @param <V>        The list element type.
52
     * @param <P>        The proxy type.
53
     * @param valueInput The serialized list proxy.
54
     * @return The deserialized list proxy.
55
     * @throws SerializationException If something goes wrong while serializing.
56
     */
57
    public <T extends IValueType<V>, V extends IValue, P extends IValueTypeListProxy<T, V>> P deserialize(ValueInput valueInput) throws SerializationException;
58

59
    /**
60
     * Factory for a list proxy.
61
     * @param <T> The list element type value type.
62
     * @param <V> The list element type.
63
     * @param <P> The proxy type.
64
     */
65
    public static interface IProxyFactory<T extends IValueType<V>, V extends IValue, P extends IValueTypeListProxy<T, V>> {
66

67
        /**
68
         * @return The unique indentifier of this proxy.
69
         */
70
        public ResourceLocation getName();
71

72
        /**
73
         * Serialize the given value.
74
         *
75
         * @param valueOutput Where to serialize to.
76
         * @param value       The value to serialize.
77
         * @throws SerializationException If something goes wrong while serializing.
78
         */
79
        public void serialize(ValueOutput valueOutput, P value) throws SerializationException;
80

81
        /**
82
         * Deserialize the given value.
83
         *
84
         * @param valueInput The value to deserialize.
85
         * @return The deserialized value.
86
         * @throws SerializationException If something goes wrong while deserializing.
87
         */
88
        public P deserialize(ValueInput valueInput) throws SerializationException;
89

90
    }
91

92
    /**
93
     * If something goes wrong while (de)serializing.
94
     */
95
    public static class SerializationException extends Exception {
96

97
        public SerializationException(String message) {
98
            super(message);
×
99
        }
×
100

101
    }
102

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