Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-124428

Firework star crashes game if there's an int array but no colors

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 20w14a
    • Minecraft 18w03b, Minecraft 18w06a, Minecraft 18w20c, Minecraft 18w22b, Minecraft 1.13, Minecraft 18w30b, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 19w12b, Minecraft 19w13b, Minecraft 19w14a, Minecraft 19w14b, 1.15.1
    • None
    • Confirmed
    • Crash

      The bug

      type the following command to get a firework star with custom color:

      /give @s minecraft:firework_star{Explosion:{Colors:[I;<color code>]}}

      game will crash when <color code> is nothing:

      /give @s minecraft:firework_star{Explosion:{Colors:[I;]}}

      and game will NOT crash when:

      /give @s minecraft:firework_rocket{Fireworks:{Explosions:[{Colors:[I;]}]}}

      Crash report

      Description: Rendering entity in world
      
      java.lang.ArithmeticException: / by zero
      	at boq$3.getColor(SourceFile:70)
      	at boq.a(SourceFile:117)
      	at cfx.a(SourceFile:182)
      	at cfx.a(SourceFile:100)
      	at cfx.a(SourceFile:80)
      	at cfx.a(SourceFile:118)
      	at cfv.a(SourceFile:142)
      	at cfv.a(SourceFile:18)
      	at cfg.a(SourceFile:362)
      	at cfg.a(SourceFile:349)
      	at cba.a(SourceFile:615)
      	at cau.b(SourceFile:1178)
      	at cau.a(SourceFile:1086)
      	at cau.a(SourceFile:944)
      	at bob.b(SourceFile:822)
      	at bob.a(SourceFile:382)
      	at net.minecraft.client.main.Main.main(SourceFile:140)
      

            panda4994 [Mojang] Panda
            Gemi0941 Gemi0941
            Votes:
            5 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: