Skip to content

Commit c73efed

Browse files
committed
small test fix
1 parent 7758711 commit c73efed

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/main/java/com/gregtechceu/gtceu/common/cover/detector/AdvancedActivityDetectorCover.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ protected void update() {
2424
return;
2525

2626
var workable = GTCapabilityHelper.getWorkable(coverHolder.getLevel(), coverHolder.getPos(), attachedSide);
27-
if (workable == null || workable.getMaxProgress() == 0)
27+
if (workable == null || workable.getMaxProgress() == 0) {
28+
setRedstoneSignalOutput(0);
2829
return;
30+
}
2931

3032
int outputAmount = RedstoneUtil.computeRedstoneValue(workable.getProgress(), workable.getMaxProgress(),
3133
isInverted());

src/test/java/com/gregtechceu/gtceu/common/cover/AdvancedDetectorCoverTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
public class AdvancedDetectorCoverTest {
2929

3030
@GameTest(template = "electrolyzer", batch = "coverTests", required = false)
31-
public static void BLOCKED_BY_LDLIB_WEIRDNESS_PROBABLY_testAdvancedActivityDetectorCover(GameTestHelper helper) {
31+
public static void testAdvancedActivityDetectorCoverWithActivity(GameTestHelper helper) {
3232
helper.pullLever(new BlockPos(2, 2, 2));
3333
MetaMachine machine = ((IMachineBlockEntity) helper.getBlockEntity(new BlockPos(1, 2, 1))).getMetaMachine();
3434
TestUtils.placeCover(helper, machine, GTItems.COVER_ACTIVITY_DETECTOR_ADVANCED.asStack(), Direction.WEST);
@@ -40,7 +40,7 @@ public static void BLOCKED_BY_LDLIB_WEIRDNESS_PROBABLY_testAdvancedActivityDetec
4040
}
4141

4242
@GameTest(template = "electrolyzer", batch = "coverTests", required = false)
43-
public static void BLOCKED_BY_LDLIB_WEIRDNESS_TOO_PROBABLY_testAdvancedActivityDetectorCover(GameTestHelper helper) {
43+
public static void testAdvancedActivityDetectorCoverWithoutActivity(GameTestHelper helper) {
4444
helper.pullLever(new BlockPos(2, 2, 2));
4545
MetaMachine machine = ((IMachineBlockEntity) helper.getBlockEntity(new BlockPos(1, 2, 1))).getMetaMachine();
4646
TestUtils.placeCover(helper, machine, GTItems.COVER_ACTIVITY_DETECTOR_ADVANCED.asStack(), Direction.WEST);

0 commit comments

Comments
 (0)