Skip to content

Commit ce51110

Browse files
authored
itemLinkCoverTest (#4333)
1 parent 42b91cf commit ce51110

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ public static void fluidLinkCoverTest(GameTestHelper helper) {
5353
});
5454
}
5555

56-
@GameTest(template = "empty_5x5", batch = "coverTests", required = false)
57-
public static void only_works_in_game_itemLinkCoverTest(GameTestHelper helper) {
56+
@GameTest(template = "empty_5x5", batch = "coverTests")
57+
public static void itemLinkCoverTest(GameTestHelper helper) {
5858
QuantumChestMachine chest1 = (QuantumChestMachine) TestUtils.setMachine(helper, new BlockPos(1, 1, 1),
5959
GTMachines.SUPER_CHEST[1]);
6060
QuantumChestMachine chest2 = (QuantumChestMachine) TestUtils.setMachine(helper, new BlockPos(1, 1, 3),
@@ -65,9 +65,11 @@ public static void only_works_in_game_itemLinkCoverTest(GameTestHelper helper) {
6565
GTItems.COVER_ENDER_ITEM_LINK.asStack(), Direction.UP);
6666
cover1.setIo(IO.IN);
6767
cover2.setIo(IO.OUT);
68-
chest1.getItemHandlerCap(Direction.UP, false).insertItem(0, new ItemStack(Items.DIAMOND, 64), false);
68+
ItemStack stack = new ItemStack(Items.DIAMOND, 64);
69+
chest1.getItemHandlerCap(Direction.UP, false).insertItem(0, stack, false);
6970
helper.runAtTickTime(20, () -> {
70-
helper.assertTrue(TestUtils.isItemStackEqual(chest2.getStored(), new ItemStack(Items.DIAMOND, 64)),
71+
helper.assertTrue(
72+
ItemStack.isSameItem(chest2.getStored(), stack) && chest2.getStoredAmount() == stack.getCount(),
7173
"ender item link cover didn't transfer items");
7274
helper.succeed();
7375
});

0 commit comments

Comments
 (0)