mojira.dev
MC-61033

Particle command don't work

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

Linked issues

Comments 6

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)

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

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

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

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

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.

mrpingouin1

michael

Unconfirmed

Minecraft 14w28a

Minecraft 14w29a

Retrieved