Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
package io.github.misode.packtest.mixin;

import io.github.misode.packtest.PackTestException;
import io.github.misode.packtest.PackTestFunction;
import io.github.misode.packtest.PackTestLibrary;
import io.github.misode.packtest.PackTest;
import net.minecraft.util.Util;
import net.minecraft.core.BlockPos;
import net.minecraft.gametest.framework.GameTestInfo;
import net.minecraft.gametest.framework.LogTestReporter;
import org.slf4j.Logger;
Expand Down Expand Up @@ -46,4 +49,14 @@ private void onTestFailed(GameTestInfo testInfo, CallbackInfo ci) {
ci.cancel();
}
}

@Inject(method = "onTestSuccess", at = @At(value = "HEAD"))
private void onTestSuccess(GameTestInfo testInfo, CallbackInfo ci) {
BlockPos blockPos = testInfo.getTestBlockPos();
if (blockPos == null) {
LOGGER.info("{} passed on tick {}!" , testInfo.id(), testInfo.getTick());
} else {
LOGGER.info("{} passed at {} on tick {}!" , testInfo.id(), blockPos.toShortString(), testInfo.getTick());
}
}
}
Loading