private void updateEffects() { for (int k = 0; k < fxes.length; ++k) { for (int j = 0; j < this.fxes[k].size(); ++j) { final EntityFX entityfx = this.fxes[k].get(j); try { if (entityfx != null) { entityfx.onUpdate(); } } catch (Throwable throwable) { CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Ticking Particle"); CrashReportCategory crashreportcategory = crashreport.makeCategory("Particle being ticked"); crashreportcategory.addCrashSectionCallable( "Particle", new Callable() { private static final String __OBFID = "CL_00000916"; public String call() { return entityfx.toString(); } }); throw new ReportedException(crashreport); } if (entityfx == null || entityfx.isDead) { this.fxes[k].remove(j--); } } } }
@Override public void onUpdate() { super.onUpdate(); int phase = (initialPhase + particleAge) % 64; motionY = 0.1f; motionX = cos[phase] * Config.soulFXPerturb; motionZ = sin[phase] * Config.soulFXPerturb; particleTrail.addFirst(new Double3(posX, posY, posZ)); while (particleTrail.size() > Config.soulFXTrailLength) particleTrail.removeLast(); if (!Config.globalEnabled) setDead(); }