// Dispatch prerender event and render.
for (LibShapeDraw apiInstance : apiInstances) {
minecraftAccess.profilerStartSection(apiInstance.getInstanceId()).profilerStartSection("prerender");
if (!apiInstance.getEventListeners().isEmpty()) {
LSDPreRenderEvent event = new LSDPreRenderEvent(apiInstance, playerCoords, minecraftAccess.getPartialTick(), isGuiHidden);
for (LSDEventListener listener : apiInstance.getEventListeners()) {
if (listener != null) {
listener.onPreRender(event);
}
}