[MC-61033] Particle command don't work Created: 09/Jul/14  Updated: 22/Aug/14  Resolved: 11/Jul/14

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Minecraft 14w28a
Fix Version/s: Minecraft 14w29a

Type: Bug
Reporter: [Helper] mrpingouin1 Assignee: [Mojang] Searge (Michael Stoyke)
Resolution: Fixed Votes: 2
Labels: None

Issue Links:
Duplicate
is duplicated by MC-60838 Particles "iconcrack_", "blockcrack_"... Resolved
is duplicated by MC-61773 /particle blockcrack_35_11 ~ ~ ~ 1 1 ... Resolved
is duplicated by MC-61873 Particle Command Iconcrack Error Resolved
is duplicated by MC-62083 blockcrack and iconcrack particles do... Resolved
is duplicated by MC-62245 /particle blockcrack not working Resolved
is duplicated by MC-68777 "blockcrack_" particle won't work, us... Resolved
Confirmation Status: Unconfirmed

 Description   

When I type this command :
/particle blockcrack_1_0 ~ ~ ~ 1 1 1 1

I get an error in the console (no crash):

[17:59:00 INFO]: Client> [17:59:00] [Server thread/ERROR]: Couldn't process command: 'particle blockcrack_1_0 ~ ~ ~ 1 1 1 1'
[17:59:00 INFO]: Client> java.lang.ArrayIndexOutOfBoundsException: 1
[17:59:00 INFO]: Client> at ca.b(SourceFile:85) ~[14w28a.jar:?]
[17:59:00 INFO]: Client> at ab.a(SourceFile:79) [14w28a.jar:?]
[17:59:00 INFO]: Client> at ab.a(SourceFile:62) [14w28a.jar:?]
[17:59:00 INFO]: Client> at qw.d(SourceFile:613) [14w28a.jar:?]
[17:59:00 INFO]: Client> at qw.a(SourceFile:600) [14w28a.jar:?]
[17:59:00 INFO]: Client> at ln.a(SourceFile:37) [14w28a.jar:?]
[17:59:00 INFO]: Client> at ln.a(SourceFile:9) [14w28a.jar:?]
[17:59:00 INFO]: Client> at ic.run(SourceFile:13) [14w28a.jar:?]
[17:59:00 INFO]: Client> at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0]
[17:59:00 INFO]: Client> at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0]
[17:59:00 INFO]: Client> at net.minecraft.server.MinecraftServer.x(SourceFile:555) [14w28a.jar:?]
[17:59:00 INFO]: Client> at net.minecraft.server.MinecraftServer.w(SourceFile:510) [14w28a.jar:?]
[17:59:00 INFO]: Client> at cwg.w(SourceFile:132) [14w28a.jar:?]
[17:59:00 INFO]: Client> at net.minecraft.server.MinecraftServer.run(SourceFile:426) [14w28a.jar:?]
[17:59:00 INFO]: Client> at java.lang.Thread.run(Unknown Source) [?:1.8.0]
[17:59:00 INFO]: Client> [17:59:00] [Client thread/INFO]: [CHAT] An unknown error occurred while attempting to perform this command



 Comments   
Comment by [Mojang] Searge (Michael Stoyke) [ 10/Jul/14 ]

The format of this particle effect changed recently. It is an internal effect, so the fix is that this particle effect is no longer listed as supported in the /particle command. It can still be used, but needs to be changed to the new format.

Instead of _1_0 which was block id and metadata before, it now only takes one parameter. the new value in this case is _1 and this is calculated like this:
newId = blockId | (metaData << 12)

Comment by [Helper] mrpingouin1 [ 10/Jul/14 ]

How does it work for itemcrack then? I tested many commands and I didn't find a working one :

/particle iconcrack_351 ~ ~ ~ 1 1 1 0.1 1000
Regular ink sac spawn normaly, but when I try to spawn Red rose particle( #351/1):

EDIT : this should work
/particle iconcrack_351_1 ~ ~ ~ 1 1 1 0.1 1000
The old syntax obviously don't work(still get an exception)

Given that Item Id are a Short type(or used to, I don't know) , itemId | (metaData << 16) would still fit in an Integer.
315 | (1 << 16) = 65851
But this don't work (nothing spawn, but I get an normal info message in the chat):
/particle iconcrack_65851 ~ ~ ~ 1 1 1 0.1 1000

I also tried these one (<<8, <<12, <<20, <<24) but none of them seem to work :
/particle iconcrack_607 ~ ~ ~ 1 1 1 0.1 1000
/particle iconcrack_4447 ~ ~ ~ 1 1 1 0.1 1000
/particle iconcrack_1048927 ~ ~ ~ 1 1 1 0.1 1000
/particle iconcrack_16777567 ~ ~ ~ 1 1 1 0.1 1000

Comment by Terence Cox [ 10/Jul/14 ]

How come this command doesn't work anymore.When I used it in 14w26c it works as intended but now I get an error in 14w28a saying [13:40:26] An unknown error occurred while attempting to perform this command. Something isn't working right and this problem isn't a works as intended.

Command: /particle blockdust_95_15 208 55 -813 10 23 20 1 10000

Comment by [Mojang] Searge (Michael Stoyke) [ 10/Jul/14 ]

I posted all infos that you need to update your commands in my last comment. Stop using the bugtracker as discussion forum, please.

Comment by [Helper] mrpingouin1 [ 10/Jul/14 ]

After a lot of research in the code, I found out that the correct syntax SHOULD be
/particle iconcrack_351_1 ~ ~ ~ 1 1 1 0.1 1000
but it seem that when the enum declare iconcrack, it only allow 1 extra param so when you want to specify a damage value (iconcrack_id_damage), it throw a java.lang.ArrayIndexOutOfBoundsException: 1

Comment by [Mojang] Searge (Michael Stoyke) [ 11/Jul/14 ]

The types blockcrack_ and blockdust_ are working as I explained. After looking into iconcrack_ again, I realized it does indeed still work with 2 parameters: iconcrack_[id]_[data]

It's fixed in the next version, but all 3 of these particle types are subject to change again in the near future when we get rid of numerical ids for them.

Generated at Mon Jul 16 09:16:25 CDT 2018 using JIRA 7.9.2#79002-sha1:3bb15b68ecd99a30eb364c4c1a393359bcad6278.