mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-22 19:58:34 +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
|
@SubscribeEvent
|
||||||
public void onRenderLast(RenderWorldLastEvent event) {
|
public void onRenderLast(RenderWorldLastEvent event) {
|
||||||
|
Minecraft mc = Minecraft.getMinecraft();
|
||||||
|
mc.profiler.func_194340_a(() -> NaturesAura.MOD_ID + ":renderParticles");
|
||||||
ParticleHandler.renderParticles(event.getPartialTicks());
|
ParticleHandler.renderParticles(event.getPartialTicks());
|
||||||
|
mc.profiler.endSection();
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
|
@ -94,12 +97,12 @@ public class ClientEvents {
|
||||||
public void onClientTick(ClientTickEvent event) {
|
public void onClientTick(ClientTickEvent event) {
|
||||||
if (event.phase == Phase.END) {
|
if (event.phase == Phase.END) {
|
||||||
Minecraft mc = Minecraft.getMinecraft();
|
Minecraft mc = Minecraft.getMinecraft();
|
||||||
if (!mc.isGamePaused()) {
|
mc.profiler.func_194340_a(() -> NaturesAura.MOD_ID + ":updateParticles");
|
||||||
|
if (!mc.isGamePaused())
|
||||||
ParticleHandler.updateParticles();
|
ParticleHandler.updateParticles();
|
||||||
}
|
if (mc.world == null)
|
||||||
if (mc.world == null) {
|
|
||||||
ParticleHandler.clearParticles();
|
ParticleHandler.clearParticles();
|
||||||
}
|
mc.profiler.endSection();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue