mojira.dev
MC-72277

stat.useItem.345 listed by autocomplete as valid does nothing

When entering the command

/scoreboard objectives add spawn stat.useItem.345

stat.useItem.345 is listed as a valid choice as is its newer form stat.useItem.minecraft.compass. Neither of these stats are functional and should be removed from autocomplete or made functional.

Linked issues

Comments 4

Item 345 is the compass (sorry changed it), so this makes also no sense that it is listed because stat.useItem is not working for crafting...
I guess they have to change this all very soon anyway, when they stop supporting number ids there, but still a bug 🙂

Also just holding it doesn't count as using (from minecraft wiki, yes I know it is not a official source)

The sub-criteria are the ID number (such as "stat.useItem.1") or ID name (such as "stat.useItem.minecraft.stone") of a block or item. Most blocks and items are accepted, except various blocks which do not have an item form.
[show]Accepted Numeric IDs
[show]Accepted ID Names
The value increments when a player uses a block or item. "Use" is defined as when:

A shovel, a pickaxe, an axe, flint and steel, shears, a hoe, bows, or a sword could consume durability; the value increments even if no durability is consumed, such as when any item that requires left click to use destroys a torch. For fishing rods and carrot on a sticks, the value increments whenever they are right-clicked; durability does not have to be consumed at all. The value does not increment when armor consumes durability.
A block is placed.
A painting, spawn egg, any type of minecart, item frame, boat,eye of ender, ender pearl, egg, snowball, bow, any type of throwable potion, Bottle o' Enchanting, or fishing rod spawns an entity.
One of the two usable dyes are properly used. Either when cocoa beans place cocoa pods on jungle wood or bone meal is used to grow plants, such as crops or grass. The value does not increment when a dye is used on a sheep.
A bucket of milk, potion, or any food, save cake which is placeable, is consumed.
An empty map, bucket, lava bucket, water bucket, milk, book and quill, or potion creates a new item. The value does not increment when bowl becomes mushroom stew or a bucket becomes milk.
A record is placed in a jukebox. Each record has a different stat.
The value, however, does not increment when items are used on mobs, whether to name, tame, feed, breed, saddle, leash, shear, milk, or gather stew from; when armor is put on directly; when leather armor is washed in a cauldron; and all instances mentioned above.

There are 357 items attainable in creative mode, without using commands and including blocks with similar IDs but different datavalues, that can use this stat and 195 that cannot.

So it seems like this is not the only incorrect suggestion, just type
"/scoreboard objectives add Test stat.useItem.35" and press tab, for example the clock probably also is incorrect as a suggestion...

Item 345 is the compass, brick is item 336.

The compass doesn't have visible left or right click event, the only way to increment its use would be when it was held in hand.

Most likely the reason it is listed in autocomplete is that it was planned to be implemented but for whatever reason wasn't. If all the items that are not supported by useItem at this time were removed from the autocomplete list, it would end much confusion. Then all of the unsupported useItem 'bugs' could be considered requests for implementation.

Do you understand why it works as intended? I don't...

Yeah, if that statistic does nothing, it should not be valid.

Dale Perkins

michael

Unconfirmed

Minecraft 1.8

Retrieved