• 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/core/network/diagnostics/RawPartData.java
1
package org.cyclops.integrateddynamics.core.network.diagnostics;
2

3
import lombok.Data;
4
import net.minecraft.core.BlockPos;
5
import net.minecraft.core.Direction;
6
import net.minecraft.core.registries.Registries;
7
import net.minecraft.nbt.CompoundTag;
8
import net.minecraft.resources.ResourceKey;
9
import net.minecraft.resources.ResourceLocation;
10
import net.minecraft.world.level.Level;
11

12
/**
13
 * @author rubensworks
14
 */
15
@Data
×
16
public class RawPartData implements IRawData {
17

18
    private final ResourceKey<Level> dimension;
×
19
    private final BlockPos pos;
×
20
    private final Direction side;
×
21
    private final String name;
×
22
    private final long last20TicksDurationNs;
×
23

24
    @Override
25
    public String toString() {
26
        return String.format("%s: %s,%s,%s,%s (%s)", name, pos.getX(), pos.getY(), pos.getZ(), side, dimension.location());
×
27
    }
28

29
    public CompoundTag toNbt() {
30
        CompoundTag tag = new CompoundTag();
×
31
        tag.putString("dimension", dimension.location().toString());
×
32
        tag.putLong("pos", pos.asLong());
×
33
        tag.putInt("side", side.ordinal());
×
34
        tag.putString("name", name);
×
35
        tag.putLong("last20TicksDurationNs", last20TicksDurationNs);
×
36
        return tag;
×
37
    }
38

39
    public static RawPartData fromNbt(CompoundTag tag) {
40
        return new RawPartData(
×
41
                ResourceKey.create(Registries.DIMENSION, ResourceLocation.parse(tag.getString("dimension").orElseThrow())),
×
42
                BlockPos.of(tag.getLong("pos").orElseThrow()),
×
43
                Direction.values()[tag.getInt("side").orElseThrow()],
×
44
                tag.getString("name").orElseThrow(),
×
45
                tag.getLong("last20TicksDurationNs").orElseThrow()
×
46
        );
47
    }
48

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