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

area_effect_cloud and lingering potions causing potion_contents.custom_color to be slightly transparent

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 1.20.5 Pre-Release 1
    • 24w13a
    • None
    • Windows 10, Java 17.0.1 64Bit
    • Confirmed
    • Commands
    • Important
    • Platform

      The new potion_contents component is breaking the rendered colour for customised area_effect_cloud entities and lingering potions. This seems to not be a problem in 1.20.4.

       

      To show as an example I have used speed potions, which should have a colour of #33EBFF (3402751 in decimal).

      I have used the following commands to spawn two area_effect_clouds (one with custom colour and another with potion id) as well as give myself two lingering potions (again one which provides a custom colour and other is default speed).

      /summon minecraft:area_effect_cloud ~5 56 ~6 {potion_contents:{custom_color:3402751}, Particle:"minecraft:entity_effect", Radius:3, Duration:1000}
      /summon minecraft:area_effect_cloud ~-5 56 ~6 {potion_contents:{potion:"minecraft:swiftness"}, Particle:"minecraft:entity_effect", Radius:3, Duration:1000}
      /give @s minecraft:lingering_potion[minecraft:potion_contents={id:"minecraft:lingering_potion", custom_color:3402751, custom_effects:[{id:"speed"}]}]
      /give @s minecraft:lingering_potion[minecraft:potion_contents={id:"minecraft:lingering_potion", potion:"minecraft:swiftness"}]

      The result is any effect cloud which uses the custom colour appears more transparent than the default lingering potion effect (and by extension the particles that appear around the player). 

       

      When looking at the entity data of the effect clouds, I noted they are listed as Particle: "minecraft:entity_effect 0x33ebff" for the custom coloured clouds and Particle: "minecraft:entity_effect 0xff33ebff" in the default effect clouds. My guess was the leading FF was being used as the colour alpha value, however using 4281592831 (FF33EBFF in decimal) I am provided the error "Malformed 'minecraft:potion_contents' component: 'Not a string; Not a number'"

            timurn [Mojang] Timur Nazarov
            Bored_Banana Tristan
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: