From b61b52c57ea224962a0271712281e9a52a07ad33 Mon Sep 17 00:00:00 2001 From: Matsv Date: Fri, 6 Apr 2018 21:02:02 +0200 Subject: [PATCH] Fix AreaEffectCloud metadata rewriting when index [9,10,11] is not provided --- .../protocols/protocolsnapshotto1_12_2/MetadataRewriter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/MetadataRewriter.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/MetadataRewriter.java index 02305086e..88064b33d 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/MetadataRewriter.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/MetadataRewriter.java @@ -17,7 +17,7 @@ import java.util.List; public class MetadataRewriter { public static void handleMetadata(int entityId, Entity1_13Types.EntityType type, List metadatas, UserConnection connection) { - int particleId = 0, parameter1 = 0, parameter2 = 0; + int particleId = -1, parameter1 = 0, parameter2 = 0; for (Metadata metadata : new ArrayList<>(metadatas)) { try { // Handle new MetaTypes @@ -92,7 +92,7 @@ public class MetadataRewriter { } // Handle AreaEffectCloud outside the loop - if (type != null && type.is(Entity1_13Types.EntityType.AREA_EFFECT_CLOUD)) { + if (type != null && type.is(Entity1_13Types.EntityType.AREA_EFFECT_CLOUD) && particleId != -1) { Particle particle = ParticleRewriter.rewriteParticle(particleId, new Integer[]{parameter1, parameter2}); metadatas.add(new Metadata(9, MetaType1_13.PARTICLE, particle)); }