diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/v1_20_3to1_20_5/rewriter/BlockItemPacketRewriter1_20_5.java b/common/src/main/java/com/viaversion/viaversion/protocols/v1_20_3to1_20_5/rewriter/BlockItemPacketRewriter1_20_5.java index d906ca951..78170ddf9 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/v1_20_3to1_20_5/rewriter/BlockItemPacketRewriter1_20_5.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/v1_20_3to1_20_5/rewriter/BlockItemPacketRewriter1_20_5.java @@ -499,9 +499,7 @@ public final class BlockItemPacketRewriter1_20_5 extends ItemRewriter explosionsTag = fireworksTag.getListTag("Explosions", CompoundTag.class); - if (explosionsTag != null) { - updateFireworks(data, fireworksTag, explosionsTag); - } + updateFireworks(data, fireworksTag, explosionsTag); } if (old.identifier() == 1085) { @@ -1022,10 +1020,11 @@ public final class BlockItemPacketRewriter1_20_5 extends ItemRewriter explosionsTag) { - final int flightDuration = fireworksTag.getInt("Flight"); + final int flightDuration = fireworksTag.getByte("Flight"); final Fireworks fireworks = new Fireworks( flightDuration, - explosionsTag.stream().limit(256).map(this::readExplosion).toArray(FireworkExplosion[]::new) + explosionsTag != null ? explosionsTag.stream().limit(256). + map(this::readExplosion).toArray(FireworkExplosion[]::new) : new FireworkExplosion[0] ); data.set(StructuredDataKey.FIREWORKS, fireworks); }