Skip to content

Commit d895e15

Browse files
authored
Fix addon wall game test when mods hand out items on login (#10)
1 parent 0758341 commit d895e15

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎loader-common/src/main/java/org/cyclops/colossalchests2/gametest/GameTestsCommon.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,8 @@ private static void tickLid(GameTestHelper helper, BlockPos corePos) {
532532

533533
private static ServerPlayer makeViewer(GameTestHelper helper) {
534534
ServerPlayer player = helper.makeMockServerPlayerInLevel();
535+
// Mods may hand out items on login, such as manuals, while clicks expect an empty hand.
536+
player.getInventory().clearContent();
535537
BlockPos near = helper.absolutePos(MIN_A.offset(1, 0, -2));
536538
player.snapTo(near.getX() + 0.5, near.getY(), near.getZ() + 0.5);
537539
return player;

0 commit comments

Comments
 (0)