Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-277834

use_cooldown component doesn't work as expected on spawneggs.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.21.3
    • None
    • Unconfirmed
    • (Unassigned)

      The use_cooldown component does not work as expected in creative and survival mode for spawn egg items.
      The component only seems to work in adventure mode as long as you try to place it on a block while it doesn't have a can_place_on component assigned.

      Way to replicate:

      • Give yourself a stack of spawn eggs with the use_cooldown component.
        "/give @s pig_spawn_egg[use_cooldown= {seconds:1,cooldown_group:"pig"}

        ] 64"

      • In creative mode, use the spawnegg. Notice: The use cooldown does not get triggered.
      • In survival mode, use the spawnegg. Notice how you lose one spawnegg because you used it, but the use cooldown does not trigger.
      • In adventure mode, use the spawnegg. Notice how the entity doesn't get spawned from the spawnegg (because you are in adventure mode and the egg doesn't have a can_place_on component), the spawnegg does not get consumed, this is intended, but somehow the use_cooldown component does get triggered.

      Additional adventure mode test with can_place_on component:

      • Give yourself a stack of spawn eggs with the use_cooldown component and a can_place_on component.
        /give @s cow_spawn_egg[use_cooldown= {seconds:1,cooldown_group:"cow"}

        ,minecraft:can_place_on=

        {blocks:"minecraft:stone"}

        ] 64

      • In adventure mode, use the spawnegg on a block that is not stone. Notice how the item does not get consumed, as expected, but the item cooldown does get triggered.
      • In adventure mode, use the spawnegg on a stone block. Notice how the item is consumed, but the item cooldown does not get triggered.

      Expected behavior: When the spawnegg is used in creative mode and survival mode and successfully spawns an entity (also in adventure mode if a can_place_on component is present), the use_cooldown component should trigger like it does with other items.

      EDIT AFTER BUG REPORT:
      This issue also affects blocks, itemframes, paintings, armorstands and boats (but minecarts do work as expected, interestingly enough) in the exact same way.

            Unassigned Unassigned
            YZEROgame YZERO
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: