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

/give, /summon, /setblock "CustomPotionEffects" tag Applies 'integer' instead of 'byte'

    XMLWordPrintable

    Details

    • Confirmation Status:
      Unconfirmed
    • Game Mode:
      Creative

      Description

      The "CustomPotionEffects" tag contains the following:

      byte | Id
      byte | Amplifier
      int | Duration
      byte | Ambient

      Via: http://minecraft.gamepedia.com/Player.dat_format#Potion_Effects

      However, when using the /give, /summon, or /setblock commands that includes a potion using the "CustomPotionEffects" tag, all of the above 'byte' tags are incorrectly set to 'integer' on the item or entity. This can cause complications when attempting to apply the effect to a mob or player, notably the Amplifier.

      This can be observed using the following command and checking its NBT data:

      /give @p potion 1 16450 {CustomPotionEffects:[{Id:1,Amplifier:0,Duration:20,Ambient:1}]}
      

      or

      /summon ThrownPotion ~ ~20 ~ {Potion:{id:373,Damage:16450,tag:{CustomPotionEffects:[{Id:1,Amplifier:0,Duration:20,Ambient:1}]}}}
      

      or

      /setblock ~ ~1 ~ chest 0 replace {Items:[{id:373,Damage:16450,Count:1,Slot:0,tag:{CustomPotionEffects:[{Id:1,Amplifier:0,Duration:20,Ambient:1}]}}]}
      

      To confirm that the tag-types should be byte where listed, the /effect command can be used, which does apply the correct tag-types (save for Ambient, which it cannot apply):

      /effect @p 1 100 0
      

      For beacons, all tags are applied correctly, including the Ambient tag. Quick command to construct a minimal beacon pyramid for observation (in the north direction):

      /summon FallingSand ~ ~1 ~-3 {TileID:138,TileEntityData:{Primary:1},Time:1,Motion:[0.0,0.25,0.0],Riding:{id:FallingSand,Riding:{id:FallingSand,TileID:42,Time:1,Motion:[0.15,0.0,0.0],Riding:{id:FallingSand,Riding:{id:FallingSand,TileID:42,Time:1,Motion:[0.0,0.0,0.15],Riding:{id:FallingSand,Riding:{id:FallingSand,TileID:42,Time:1,Motion:[-0.15,0.0,0.0],Riding:{id:FallingSand,Riding:{id:FallingSand,TileID:42,Time:1,Motion:[0.0,0.0,-0.15],Riding:{id:FallingSand,Riding:{id:FallingSand,TileID:42,Time:1,Motion:[0.15,0.0,0.15],Riding:{id:FallingSand,Riding:{id:FallingSand,TileID:42,Time:1,Motion:[-0.15,0.0,0.15],Riding:{id:FallingSand,Riding:{id:FallingSand,TileID:42,Time:1,Motion:[-0.15,0.0,-0.15],Riding:{id:FallingSand,Riding:{id:FallingSand,TileID:42,Time:1,Motion:[0.15,0.0,-0.15],Riding:{id:FallingSand,Riding:{id:FallingSand,TileID:42,Time:1,Motion:[0.0,0.0,0.0]}}}}}}}}}}}}}}}}}}}
      

      Relates slightly to https://mojang.atlassian.net/browse/MC-35127 except that one involves an always incorrect tag-type (not necessarily through commands), while the CustomPotionEffects tag-types are incorrectly applied through dataTags.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              skylinerw [Mod] Skylinerw
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: