[MC-10558] Internal error when using /effect with an id >31 Created: 28/Feb/13  Updated: 06/May/15  Resolved: 01/Mar/13

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Snapshot 13w09b
Fix Version/s: Snapshot 13w09c

Type: Bug
Reporter: Sir Lord Jeff Assignee: [Mojang] Jeb (Jens Bergensten)
Resolution: Fixed Votes: 0
Labels: command, effect, effects, internal

Attachments: PNG File Error.PNG    
CHK:
Confirmation Status: Confirmed
Game Mode: Creative

 Description   

If you use /effect and set the id value to be greater than 31 instead of displaying "There is no such mob effect with that id" it displays the internal error message that means the command has generally broken.

See attachment (the outputs are from me trying numbers 30 to 33. I have also tried this with 43 (i was entering random numbers as parameters when I tried this)

The exact command I ran was " /effect @p 33 " in case it is something else causing the message.



 Comments   
Comment by Kumasasa [ 01/Apr/13 ]

Remove the problematic potion effects with an NBT editor, e.g. NBT explorer.
See the format here : http://www.minecraftwiki.net/wiki/Player.dat

Comment by max müller [ 01/Apr/13 ]

i cant join my world.
i used /effect 0 500 1
Why?!?!?
when i join the world i only see the dirt wallpaper... HELP ME PLEASSSSEEEE

Comment by Matthew Mirvish [ 02/Mar/13 ]

it does this because, although there can be 32 potion effects, some of which are for modders, anything above this limit causes the index in the list of potions to exceed maximum

Comment by Kumasasa [ 28/Feb/13 ]

Confirmed:

2013-02-28 21:16:59 [CLIENT] [INFO] [CHAT] ºcThere is no such mob effect with ID 31
2013-02-28 21:17:05 [CLIENT] [INFO] [CHAT] ºcAn unknown error occurred while attempting to perform this command
java.lang.ArrayIndexOutOfBoundsException: 32
        at ae.b(SourceFile:40)
        at y.a(SourceFile:51)
        at jg.d(SourceFile:478)
        at jg.a(SourceFile:460)
        at cw.a(SourceFile:44)
        at ch.b(SourceFile:59)
        at jg.d(SourceFile:59)
        at jh.b(SourceFile:35)
        at bja.b(SourceFile:84)
        at net.minecraft.server.MinecraftServer.r(SourceFile:480)
        at net.minecraft.server.MinecraftServer.q(SourceFile:397)
        at bix.q(SourceFile:122)
        at net.minecraft.server.MinecraftServer.run(SourceFile:331)
        at go.run(SourceFile:573)
Generated at Sun Jan 12 12:24:46 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.