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

CyclopsMC / IntegratedDynamics / 21104370479

18 Jan 2026 02:08AM UTC coverage: 45.176% (-0.008%) from 45.184%
21104370479

Pull #1594

github

web-flow
Merge 51f5da90d into 506a005e1
Pull Request #1594: Fix part capabilities not being invalidated when network is reinitialized

2633 of 8602 branches covered (30.61%)

Branch coverage included in aggregate %.

11924 of 23621 relevant lines covered (50.48%)

2.4 hits per line

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

60.0
/src/main/java/org/cyclops/integrateddynamics/capability/partcontainer/PartContainerTileMultipartTicking.java
1
package org.cyclops.integrateddynamics.capability.partcontainer;
2

3
import net.minecraft.core.BlockPos;
4
import net.minecraft.core.Direction;
5
import net.minecraft.world.entity.player.Player;
6
import net.minecraft.world.level.Level;
7
import net.minecraft.world.phys.shapes.CollisionContext;
8
import org.cyclops.integrateddynamics.api.network.INetwork;
9
import org.cyclops.integrateddynamics.api.part.IPartContainer;
10
import org.cyclops.integrateddynamics.block.BlockCable;
11
import org.cyclops.integrateddynamics.core.block.BlockRayTraceResultComponent;
12
import org.cyclops.integrateddynamics.core.blockentity.BlockEntityMultipartTicking;
13

14
import javax.annotation.Nullable;
15

16
/**
17
 * Implementation of an {@link IPartContainer} for a part entity.
18
 * @author rubensworks
19
 */
20
public class PartContainerTileMultipartTicking extends PartContainerDefault {
21

22
    private final BlockEntityMultipartTicking tile;
23

24
    public PartContainerTileMultipartTicking(BlockEntityMultipartTicking tile) {
2✔
25
        this.tile = tile;
3✔
26
    }
1✔
27

28
    protected BlockEntityMultipartTicking getTile() {
29
        return tile;
3✔
30
    }
31

32
    @Override
33
    protected void setChanged() {
34
        getTile().setChanged();
3✔
35
        getLevel().invalidateCapabilities(getPos());
5✔
36
    }
1✔
37

38
    @Override
39
    protected void sendUpdate() {
40
        getTile().sendUpdate();
3✔
41
    }
1✔
42

43
    @Override
44
    protected Level getLevel() {
45
        return getTile().getLevel();
4✔
46
    }
47

48
    @Override
49
    protected BlockPos getPos() {
50
        return getTile().getBlockPos();
4✔
51
    }
52

53
    @Override
54
    protected INetwork getNetwork() {
55
        return getTile().getNetwork();
4✔
56
    }
57

58
    @Nullable
59
    @Override
60
    public Direction getWatchingSide(Level world, BlockPos pos, Player player) {
61
        BlockRayTraceResultComponent rayTraceResult = ((BlockCable) world.getBlockState(pos).getBlock())
×
62
                .getSelectedShape(world.getBlockState(pos), world, pos, CollisionContext.of(player))
×
63
                .rayTrace(pos, player);
×
64
        if(rayTraceResult != null) {
×
65
            return rayTraceResult.getComponent().getRaytraceDirection();
×
66
        }
67
        return null;
×
68
    }
69
}
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