Code/net/minecraft/gametest/framework/LogTestReporter.java

23 lines
763 B
Java
Raw Permalink Normal View History

2025-07-01 06:20:03 +00:00
package net.minecraft.gametest.framework;
import com.mojang.logging.LogUtils;
import net.minecraft.Util;
import org.slf4j.Logger;
public class LogTestReporter implements TestReporter {
private static final Logger LOGGER = LogUtils.getLogger();
@Override
public void onTestFailed(GameTestInfo p_127797_) {
String s = p_127797_.getTestBlockPos().toShortString();
if (p_127797_.isRequired()) {
LOGGER.error("{} failed at {}! {}", p_127797_.id(), s, Util.describeError(p_127797_.getError()));
} else {
LOGGER.warn("(optional) {} failed at {}. {}", p_127797_.id(), s, Util.describeError(p_127797_.getError()));
}
}
@Override
public void onTestSuccess(GameTestInfo p_177676_) {
}
}