• 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/part/AttachCapabilitiesEventPart.java
1
package org.cyclops.integrateddynamics.api.part;
2

3
import net.neoforged.bus.api.Event;
4
import net.neoforged.neoforge.capabilities.ICapabilityProvider;
5

6
import java.util.ArrayList;
7
import java.util.Objects;
8

9
/**
10
 * Event for when an {@link IPartState} is being constructed.
11
 * @author rubensworks
12
 */
13
public class AttachCapabilitiesEventPart extends Event {
14

15
    private final IPartType partType;
16
    private final IPartState partState;
17

18
    public AttachCapabilitiesEventPart(IPartType partType, IPartState partState) {
×
19
        this.partType = partType;
×
20
        this.partState = partState;
×
21
    }
×
22

23
    public IPartType getPartType() {
24
        return partType;
×
25
    }
26

27
    public IPartState getPartState() {
28
        return this.partState;
×
29
    }
30

31
    public <T> void register(
32
            PartCapability<T> capability,
33
            IPartType<?, ?> partType,
34
            ICapabilityProvider<IPartType<?, ?>, PartTarget, T> provider
35
    ) {
36
        Objects.requireNonNull(provider);
×
37
        capability.providers.computeIfAbsent(Objects.requireNonNull(partType), i -> new ArrayList<>()).add(provider);
×
38
    }
×
39

40
    public boolean isRegistered(PartCapability<?> capability, IPartType<?, ?> partType) {
41
        Objects.requireNonNull(partType);
×
42
        return capability.providers.containsKey(partType);
×
43
    }
44
}
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