mojira.dev
MC-33246

Multicolor Fireworks crash game when given using /give, or summoned using /summon

Put the summary of the bug you're here

What I expected to happen was...:
I expected the firework to function by bursting in a rainbow made of many colors.

What actually happened was...:
The firework crashed due to a particle bug, after it worked correctly, and displays the error "n must be positive."
Also, the launcher says my game is modded, when it has no functioning mods in my game files.

Steps to Reproduce:
1.First, use /summon in a command block to spawn the firework. It will work for a bit, than crash on a particle.
2. /give gives you a firework that when used, crashes.
3. The firework used to make the entity works just fine with no crashes.

Description: Ticking Particle

java.lang.IllegalArgumentException: n must be positive
	at java.util.Random.nextInt(Random.java:250)
	at bjx.a(SourceFile:181)
	at bjx.a(SourceFile:203)
	at bjx.h(SourceFile:91)
	at bkg.a(SourceFile:64)
	at azd.o(SourceFile:1563)
	at azd.ad(SourceFile:753)
	at azd.e(SourceFile:704)
	at net.minecraft.client.main.Main.main(SourceFile:103)

Environment

64 bit Java 6 Mac OS X 10.6.8 Snow Leopard

Attachments

Comments 8

/summon FireworksRocketEntity ~ ~1 ~ {LifeTime:40,FireworksItem:{id:401,Count:1,tag:{Fireworks:{Flight:1,Explosions:[{Type:1,Flicker:1,Trail:1,Colors:[11743532,11743532,2651799,15790320,4312372,14602026,1973019,1973019,5320730,2651799,2651799,11250603,14602026,15435844]},{Type:1,Flicker:1,Trail:1,FadeColors:[11743532,11743532,2651799,15790320,4312372,14602026,1973019,1973019,5320730,2651799,2651799,11250603,14602026,15435844,5320730,1973019,2651799,4312372,14188952,14188952]},
....
{Type:1,Flicker:1,Trail:1,FadeColors:[11743532,2651799,3887386,11250603,8073150,1973019,11250603,2651799,8073150,2437522,14602026,4312372,14188952,4408131,15790320,15435844,12801229,6719955,3887386,11743532,2651799,4312372,11743532,1973019,15435844,2437522,4312372,11250603,14602026]}]}}}}

Confirmed by me for 1.7.3.

The tooltip of the original firework and the /give firework have the actual color names, and not "Custom", meaning that the firework was created in vanilla, or with Bukkit essential's firework kits color names. It could also have been made using a firework color and dye table. Upon further inspection and realization, I found that they could not have been created in survival without using TooManyItems, however, that is ruled out because I got the fireworks from a friend of a server admin, who was on a Bukkit server with essentials. Another firework that was given to me was similar to the default fireworks kit, meaning that it was acquired through the kits config file. 1 more piece of proof is that there is 50 explosions in the firework., meaning that nobody would want to craft it, even if they were in creative.
I hope that gives a decent answer.

Workaround is to remove fadecolors, and replace them with colors.

Fixed in 08a (works fine with Kumasasa's command in this version)

Works even with the original command, see the attached text file.

Yep, i didn't see it 😃

migrated

(Unassigned)

Confirmed

crash

Minecraft 13w39b, Minecraft 1.7.2, Minecraft 1.7.3, Minecraft 1.7.4, Minecraft 1.7.5

Minecraft 14w05b

Retrieved