• 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/infobook/pageelement/AspectAppendix.java
1
package org.cyclops.integrateddynamics.infobook.pageelement;
2

3
import net.minecraft.world.item.ItemStack;
4
import org.cyclops.cyclopscore.infobook.IInfoBook;
5
import org.cyclops.cyclopscore.infobook.InfoBookParser;
6
import org.cyclops.cyclopscore.infobook.InfoSection;
7
import org.cyclops.cyclopscore.infobook.pageelement.SectionAppendix;
8
import org.cyclops.integrateddynamics.IntegratedDynamics;
9
import org.cyclops.integrateddynamics.RegistryEntries;
10
import org.cyclops.integrateddynamics.api.item.IVariableFacadeHandlerRegistry;
11
import org.cyclops.integrateddynamics.api.part.aspect.IAspect;
12
import org.cyclops.integrateddynamics.core.item.AspectVariableFacade;
13
import org.cyclops.integrateddynamics.part.aspect.Aspects;
14

15
/**
16
 * Aspect appendix.
17
 * @author rubensworks
18
 */
19
public class AspectAppendix extends SectionAppendix<AspectAppendixClient> {
20

21
    private final IAspect<?, ?> aspect;
22
    private ItemStack itemStack;
23

24
    public AspectAppendix(IInfoBook infoBook, IAspect<?, ?> aspect) throws InfoBookParser.InvalidAppendixException {
25
        super(infoBook);
×
26
        this.aspect = aspect;
×
27
    }
×
28

29
    public IAspect<?, ?> getAspect() {
30
        return aspect;
×
31
    }
32

33
    public ItemStack getItemStack() {
34
        return itemStack;
×
35
    }
36

37
    @Override
38
    protected int getOffsetY() {
39
        return 5;
×
40
    }
41

42
    @Override
43
    protected int getWidth() {
44
        return 100;
×
45
    }
46

47
    @Override
48
    protected int getHeight() {
49
        return 30 + (aspect.hasProperties() ? 10 * (aspect.getPropertyTypes().size() + 1) : 0);
×
50
    }
51

52
    @Override
53
    public AspectAppendixClient constructSectionAppendixClient() {
54
        return new AspectAppendixClient(this);
×
55
    }
56

57
    @Override
58
    public void preBakeElement(InfoSection infoSection) {
59

60
    }
×
61

62
    @Override
63
    public void bakeElement(InfoSection infoSection) {
64
        IVariableFacadeHandlerRegistry registry = IntegratedDynamics._instance.getRegistryManager().getRegistry(IVariableFacadeHandlerRegistry.class);
×
65
        itemStack = registry.writeVariableFacadeItem(new ItemStack(RegistryEntries.ITEM_VARIABLE),
×
66
                new AspectVariableFacade(false, 0, aspect), Aspects.REGISTRY);
67
    }
×
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