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

3
import com.google.common.collect.Lists;
4
import net.minecraft.world.item.ItemStack;
5
import net.minecraft.world.item.crafting.display.RecipeDisplayEntry;
6
import org.cyclops.cyclopscore.helper.IModHelpers;
7
import org.cyclops.cyclopscore.infobook.AdvancedButtonEnum;
8
import org.cyclops.cyclopscore.infobook.IInfoBook;
9
import org.cyclops.cyclopscore.infobook.InfoBookParser;
10
import org.cyclops.cyclopscore.infobook.InfoSection;
11
import org.cyclops.cyclopscore.infobook.pageelement.RecipeAppendix;
12
import org.cyclops.integrateddynamics.RegistryEntries;
13
import org.cyclops.integrateddynamics.core.recipe.display.RecipeDisplaySqueezer;
14

15
import java.util.List;
16
import java.util.function.Supplier;
17

18
/**
19
 * Squeezer recipes.
20
 * @author rubensworks
21
 */
22
public class SqueezerRecipeAppendix extends RecipeAppendix<SqueezerRecipeAppendixClient> {
23

24
    public static final int SLOT_INPUT_OFFSET_X = 16;
25
    public static final int SLOT_OFFSET_Y = 23;
26
    public static final int SLOT_OUTPUT_OFFSET_X = 68;
27

28
    public static final AdvancedButtonEnum INPUT_ITEM = AdvancedButtonEnum.create();
×
29
    public static final AdvancedButtonEnum RESULT_FLUID = AdvancedButtonEnum.create();
×
30

31
    private List<AdvancedButtonEnum> resultItems;
32

33
    public SqueezerRecipeAppendix(IInfoBook infoBook, Supplier<RecipeDisplayEntry> recipeDisplaySupplier) throws InfoBookParser.InvalidAppendixException {
34
        super(infoBook, recipeDisplaySupplier);
×
35
    }
×
36

37
    public List<AdvancedButtonEnum> getResultItems() {
38
        return resultItems;
×
39
    }
40

41
    @Override
42
    protected int getWidth() {
43
        return SLOT_OUTPUT_OFFSET_X + 32;
×
44
    }
45

46
    @Override
47
    public SqueezerRecipeAppendixClient constructSectionAppendixClient() throws InfoBookParser.InvalidAppendixException {
48
        return new SqueezerRecipeAppendixClient(this);
×
49
    }
50

51
    @Override
52
    protected int getHeightInner() {
53
        RecipeDisplayEntry recipeDisplay = getRecipeDisplay();
×
54
        if (recipeDisplay == null) {
×
55
            return 10;
×
56
        }
57
        return (!((RecipeDisplaySqueezer) recipeDisplay.display()).outputFluid().isEmpty() ? SLOT_OFFSET_Y : 0) + ((RecipeDisplaySqueezer) recipeDisplay.display()).outputItems().size() * SLOT_OFFSET_Y - 3;
×
58
    }
59

60
    @Override
61
    protected String getUnlocalizedTitle() {
62
        return "block.integrateddynamics.squeezer";
×
63
    }
64

65
    @Override
66
    public void bakeElement(InfoSection infoSection) {
67
        resultItems = Lists.newArrayList();
×
68

69
        RecipeDisplayEntry recipeDisplay = getRecipeDisplay();
×
70
        if (recipeDisplay == null) {
×
71
            return;
×
72
        }
73

74
        RecipeDisplaySqueezer display = ((RecipeDisplaySqueezer) recipeDisplay.display());
×
75
        for (int i = 0; i < display.outputItems().size(); i++) {
×
76
            resultItems.add(AdvancedButtonEnum.create());
×
77
        }
78

79
        if (IModHelpers.get().getMinecraftHelpers().isClientSide()) {
×
80
            getSectionAppendixClient().bakeElement(infoSection);
×
81
        }
82
        super.bakeElement(infoSection);
×
83
    }
×
84

85
    protected ItemStack getCrafter()  {
86
        return new ItemStack(RegistryEntries.BLOCK_SQUEEZER.get());
×
87
    }
88

89

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