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

CyclopsMC / IntegratedDynamics / 20210191346

14 Dec 2025 03:32PM UTC coverage: 19.514% (-33.5%) from 53.061%
20210191346

push

github

rubensworks
Remove deprecations

663 of 8728 branches covered (7.6%)

Branch coverage included in aggregate %.

6786 of 29445 relevant lines covered (23.05%)

1.09 hits per line

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

0.0
/src/main/java/org/cyclops/integrateddynamics/gametest/GameTestsAspectsReadRedstone.java
1
package org.cyclops.integrateddynamics.gametest;
2

3
import net.minecraft.core.BlockPos;
4
import net.minecraft.gametest.framework.GameTestHelper;
5
import net.minecraft.world.item.ItemStack;
6
import net.minecraft.world.item.Items;
7
import net.minecraft.world.level.block.Blocks;
8
import net.minecraft.world.level.block.entity.ChestBlockEntity;
9
import org.cyclops.cyclopscore.gametest.GameTest;
10
import org.cyclops.integrateddynamics.api.part.aspect.IAspectVariable;
11
import org.cyclops.integrateddynamics.core.evaluate.variable.ValueTypeBoolean;
12
import org.cyclops.integrateddynamics.core.evaluate.variable.ValueTypeInteger;
13
import org.cyclops.integrateddynamics.core.part.PartTypes;
14
import org.cyclops.integrateddynamics.part.aspect.Aspects;
15

16
import java.util.function.Supplier;
17

18
import static org.cyclops.integrateddynamics.gametest.GameTestHelpersIntegratedDynamics.testReadAspect;
19
import static org.cyclops.integrateddynamics.gametest.GameTestHelpersIntegratedDynamics.testReadAspectSetup;
20

21
public class GameTestsAspectsReadRedstone {
×
22

23
    public static final String TEMPLATE_EMPTY = "integrateddynamics:empty10";
24
    public static final BlockPos POS = BlockPos.ZERO.offset(2, 0, 2);
×
25

26
    @GameTest(template = TEMPLATE_EMPTY)
27
    public void testAspectsReadRedstoneBooleanLow(GameTestHelper helper) {
28
        helper.setBlock(POS.west(), Blocks.REDSTONE_BLOCK);
×
29
        testReadAspect(POS, helper, PartTypes.REDSTONE_READER, Aspects.Read.Redstone.BOOLEAN_LOW, ValueTypeBoolean.ValueBoolean.of(false));
×
30
    }
×
31

32
    @GameTest(template = TEMPLATE_EMPTY)
33
    public void testAspectsReadRedstoneBooleanNonLow(GameTestHelper helper) {
34
        helper.setBlock(POS.west(), Blocks.REDSTONE_BLOCK);
×
35
        testReadAspect(POS, helper, PartTypes.REDSTONE_READER, Aspects.Read.Redstone.BOOLEAN_NONLOW, ValueTypeBoolean.ValueBoolean.of(true));
×
36
    }
×
37

38
    @GameTest(template = TEMPLATE_EMPTY)
39
    public void testAspectsReadRedstoneBooleanHigh(GameTestHelper helper) {
40
        helper.setBlock(POS.west(), Blocks.REDSTONE_BLOCK);
×
41
        testReadAspect(POS, helper, PartTypes.REDSTONE_READER, Aspects.Read.Redstone.BOOLEAN_HIGH, ValueTypeBoolean.ValueBoolean.of(true));
×
42
    }
×
43

44
    @GameTest(template = TEMPLATE_EMPTY)
45
    public void testAspectsReadRedstoneBooleanClock(GameTestHelper helper) {
46
        helper.setBlock(POS.west(), Blocks.REDSTONE_BLOCK);
×
47
        Supplier<IAspectVariable> variableSupplier = testReadAspectSetup(POS, helper, PartTypes.REDSTONE_READER, Aspects.Read.Redstone.BOOLEAN_CLOCK);
×
48
        helper.startSequence()
×
49
                .thenWaitUntil(() -> GameTestHelpersIntegratedDynamics.assertValueEqual(helper, variableSupplier.get(), ValueTypeBoolean.ValueBoolean.of(false)))
×
50
                .thenWaitUntil(() -> GameTestHelpersIntegratedDynamics.assertValueEqual(helper, variableSupplier.get(), ValueTypeBoolean.ValueBoolean.of(true)))
×
51
                .thenSucceed();
×
52
    }
×
53

54
    @GameTest(template = TEMPLATE_EMPTY)
55
    public void testAspectsReadRedstoneInteger(GameTestHelper helper) {
56
        helper.setBlock(POS.west(), Blocks.CHEST);
×
57
        ChestBlockEntity chest = helper.getBlockEntity(POS.west(), ChestBlockEntity.class);
×
58
        chest.setItem(0, new ItemStack(Items.COAL));
×
59
        testReadAspect(POS, helper, PartTypes.REDSTONE_READER, Aspects.Read.Redstone.INTEGER_COMPARATOR, ValueTypeInteger.ValueInteger.of(1));
×
60
    }
×
61

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