use of org.blockartistry.DynSurround.client.handlers.trace.TraceParticleManager in project DynamicSurroundings by OreCruncher.
the class DiagnosticHandler method process.
@Override
public void process(@Nonnull final EntityPlayer player) {
// Gather diagnostics if needed
if (Minecraft.getMinecraft().gameSettings.showDebugInfo) {
this.diagnostics = new ArrayList<>();
if (DSurround.isDeveloperMode())
this.diagnostics.add(TextFormatting.RED + "DEVELOPER MODE ENABLED");
if (ModOptions.logging.enableDebugLogging) {
final DiagnosticEvent.Gather gather = new DiagnosticEvent.Gather(player.getEntityWorld(), player);
MinecraftForge.EVENT_BUS.post(gather);
this.diagnostics.addAll(gather.output);
}
} else {
this.diagnostics = null;
}
if (ModOptions.logging.showDebugDialog)
DiagnosticPanel.refresh();
if (DSurround.isDeveloperMode()) {
final ParticleManager pm = Minecraft.getMinecraft().effectRenderer;
if (!(pm instanceof TraceParticleManager)) {
DSurround.log().info("Wrapping particle manager [%s]", pm.getClass().getName());
Minecraft.getMinecraft().effectRenderer = new TraceParticleManager(pm);
}
}
}
Aggregations