@SubscribeEvent public void onRenderWorldLast(final RenderWorldLastEvent event) { final EntityPlayerSP player = this.mc.thePlayer; if (player != null) { this.profiler.startSection("schematica"); ClientProxy.setPlayerData(player, event.partialTicks); final SchematicWorld schematic = ClientProxy.schematic; final boolean isRenderingSchematic = schematic != null && schematic.isRendering; this.profiler.startSection("schematic"); if (isRenderingSchematic) { GlStateManager.pushMatrix(); renderSchematic(schematic, event.partialTicks); GlStateManager.popMatrix(); } this.profiler.endStartSection("guide"); if (ClientProxy.isRenderingGuide || isRenderingSchematic) { GlStateManager.pushMatrix(); renderOverlay(schematic, isRenderingSchematic); GlStateManager.popMatrix(); } this.profiler.endSection(); this.profiler.endSection(); } }
private void loadSchematic() { int selectedIndex = this.guiSchematicLoadSlot.selectedIndex; try { if (selectedIndex >= 0 && selectedIndex < this.schematicFiles.size()) { GuiSchematicEntry schematicEntry = this.schematicFiles.get(selectedIndex); if (Schematica.proxy.loadSchematic(null, this.currentDirectory, schematicEntry.getName())) { SchematicWorld schematic = ClientProxy.schematic; if (schematic != null) { ClientProxy.moveSchematicToPlayer(schematic); } } } } catch (Exception e) { Reference.logger.error("Failed to load schematic!", e); } }