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

3
import net.minecraft.core.Direction;
4
import net.minecraft.world.item.ItemStack;
5

6
/**
7
 * Capability for cables that can form networks.
8
 * Note that this is an UNSIDED capability, so only one should exist per side.
9
 * This is because cable sides are too dependent of each other.
10
 * @author rubensworks
11
 */
12
public interface ICable {
13

14
    /**
15
     * Check if this part should connect with the given cable for the given side.
16
     * This method MUST NOT call the {@link ICable#canConnect(ICable, Direction)} method
17
     * of the connector, this is checked externally, otherwise infinite loops will occur.
18
     * @param connector The connecting block.
19
     * @param side The side of the connecting block.
20
     * @return If it should connect.
21
     */
22
    public boolean canConnect(ICable connector, Direction side);
23

24
    public default void updateConnections() {
25
        this.updateConnections(true);
×
26
    }
×
27

28
    /**
29
     * Update the cable connections.
30
     * @param setChanged If the block entity should be marked as changed.
31
     */
32
    public void updateConnections(boolean setChanged);
33

34
    /**
35
     * Check if this cable is connected to a side.
36
     * This method should not check any neighbours,
37
     * it should internally store the connection.
38
     * @param side The side to check a connection for.
39
     * @return If this block is connected with that side.
40
     */
41
    public boolean isConnected(Direction side);
42

43
    /**
44
     * Disconnect the cable connection for a side.
45
     * @param side The side to block the connection for.
46
     */
47
    public void disconnect(Direction side);
48

49
    /**
50
     * Reconnect the cable connection for a side.
51
     * Will only do something if the cable was previously disconnected.
52
     * @param side The side to remake the connection for.
53
     */
54
    public void reconnect(Direction side);
55

56
    /**
57
     * @return The item stack that is dropped when breaking this cable, when using a wrench for example.
58
     */
59
    public ItemStack getItemStack();
60

61
    /**
62
     * Called when this cable is removed by a wrench.
63
     */
64
    public void destroy();
65
}
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