• 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/client/gui/ContainerScreenActiveVariableBase.java
1
package org.cyclops.integrateddynamics.core.client.gui;
2

3
import net.minecraft.client.gui.Font;
4
import net.minecraft.client.gui.GuiGraphics;
5
import net.minecraft.network.chat.Component;
6
import net.minecraft.util.ARGB;
7
import net.minecraft.world.entity.player.Inventory;
8
import org.cyclops.cyclopscore.client.gui.container.ContainerScreenExtended;
9
import org.cyclops.cyclopscore.helper.IModHelpers;
10
import org.cyclops.integrateddynamics.core.client.gui.container.DisplayErrorsComponent;
11
import org.cyclops.integrateddynamics.core.inventory.container.ContainerActiveVariableBase;
12

13
/**
14
 * Base gui for part entities that can hold variables.
15
 * @author rubensworks
16
 */
17
public abstract class ContainerScreenActiveVariableBase<C extends ContainerActiveVariableBase<?>> extends ContainerScreenExtended<C> {
18

19
    protected final DisplayErrorsComponent displayErrors = new DisplayErrorsComponent();
×
20

21
    public ContainerScreenActiveVariableBase(C container, Inventory playerInventory, Component title) {
22
        super(container, playerInventory, title);
×
23
    }
×
24

25
    protected abstract int getErrorX();
26
    protected abstract int getErrorY();
27

28
    protected int getValueX() {
29
        return 54;
×
30
    }
31

32
    protected int getValueY() {
33
        return 57;
×
34
    }
35

36
    @Override
37
    protected void renderBg(GuiGraphics guiGraphics, float f, int x, int y) {
38
        super.renderBg(guiGraphics, f, x, y);
×
39

40
        Component readValue = getMenu().getReadValue();
×
41
        int readValueColor = getMenu().getReadValueColor();
×
42
        boolean ok = false;
×
43
        if (readValue != null) {
×
44
            ok = true;
×
45
            IModHelpers.get().getRenderHelpers().drawScaledCenteredString(guiGraphics, font, readValue.getString(),
×
46
                    getGuiLeftTotal() + getValueX(), getGuiTopTotal() + getValueY(), 70, ARGB.opaque(readValueColor), false, Font.DisplayMode.NORMAL);
×
47
        }
48

49
        displayErrors.drawBackground(guiGraphics, getMenu().getReadErrors(), getErrorX(), getErrorY(), getErrorX(), getErrorY(), this,
×
50
                this.leftPos, this.topPos, ok);
51
    }
×
52

53
    @Override
54
    protected void renderLabels(GuiGraphics guiGraphics, int mouseX, int mouseY) {
55
        // super.drawGuiContainerForegroundLayer(matrixStack, mouseX, mouseY);
56
        guiGraphics.drawString(font, this.title, this.titleLabelX, this.titleLabelY, ARGB.opaque(4210752), false);
×
57
        displayErrors.drawForeground(guiGraphics, getMenu().getReadErrors(), getErrorX(), getErrorY(), mouseX, mouseY, this, this.leftPos, this.topPos);
×
58
    }
×
59
}
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