From 30e7ba4ec5379b838ac89c0fa682fb7ee9d76a11 Mon Sep 17 00:00:00 2001 From: idinium96 <47635037+idinium96@users.noreply.github.com> Date: Fri, 19 Jul 2024 04:40:06 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20delete=20empty=20effect=20name?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/schema.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/schema.js b/lib/schema.js index 8e7a01a..15489d7 100644 --- a/lib/schema.js +++ b/lib/schema.js @@ -1911,7 +1911,7 @@ class Schema { getParticleEffects() { let previous = ''; - return this.raw.schema.attribute_controlled_attached_particles.reduce((obj, particle) => { + const effect = this.raw.schema.attribute_controlled_attached_particles.reduce((obj, particle) => { const particleName = particle.name; if (particleName !== previous) { obj[particleName] = particle.id; @@ -1933,6 +1933,9 @@ class Schema { previous = particleName; return obj; }, {}); + // id 326 has an empty name causing things to broke + if (!!effect['']) delete effect['']; + return effect; } getPaintKits() {