add some particle profiling

This commit is contained in:
Ellpeck 2019-01-27 19:18:21 +01:00
parent 37bd687d1f
commit f0fc6085df

View file

@ -82,7 +82,10 @@ public class ClientEvents {
@SubscribeEvent
public void onRenderLast(RenderWorldLastEvent event) {
Minecraft mc = Minecraft.getMinecraft();
mc.profiler.func_194340_a(() -> NaturesAura.MOD_ID + ":renderParticles");
ParticleHandler.renderParticles(event.getPartialTicks());
mc.profiler.endSection();
}
@SubscribeEvent
@ -94,12 +97,12 @@ public class ClientEvents {
public void onClientTick(ClientTickEvent event) {
if (event.phase == Phase.END) {
Minecraft mc = Minecraft.getMinecraft();
if (!mc.isGamePaused()) {
mc.profiler.func_194340_a(() -> NaturesAura.MOD_ID + ":updateParticles");
if (!mc.isGamePaused())
ParticleHandler.updateParticles();
}
if (mc.world == null) {
if (mc.world == null)
ParticleHandler.clearParticles();
}
mc.profiler.endSection();
}
}