use of net.minecraft.util.crash.CrashReportSection in project fabric by FabricMC.
the class TerrainRenderContext method tesselateBlock.
/**
* Called from chunk renderer hook.
*/
public boolean tesselateBlock(BlockState blockState, BlockPos blockPos, final BakedModel model) {
try {
aoCalc.clear();
blockInfo.prepareForBlock(blockState, blockPos, model.useAmbientOcclusion());
chunkInfo.beginBlock();
((FabricBakedModel) model).emitBlockQuads(blockInfo.blockView, blockInfo.blockState, blockInfo.blockPos, blockInfo.randomSupplier, this);
} catch (Throwable var9) {
CrashReport crashReport_1 = CrashReport.create(var9, "Tesselating block in world - Indigo Renderer");
CrashReportSection crashReportElement_1 = crashReport_1.addElement("Block being tesselated");
CrashReportSection.addBlockInfo(crashReportElement_1, blockPos, blockState);
throw new CrashException(crashReport_1);
}
return chunkInfo.resultFlags[blockInfo.defaultLayerIndex];
}
use of net.minecraft.util.crash.CrashReportSection in project lithium-fabric by CaffeineMC.
the class DataTrackerMixin method onGetException.
private static <T> CrashException onGetException(Throwable cause, TrackedData<T> data) {
CrashReport report = CrashReport.create(cause, "Getting synced entity data");
CrashReportSection section = report.addElement("Synced entity data");
section.add("Data ID", data);
return new CrashException(report);
}
Aggregations