mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-12-22 14:59:22 +01:00
add some particle profiling
This commit is contained in:
parent
37bd687d1f
commit
f0fc6085df
1 changed files with 7 additions and 4 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue