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

Jukebox note particles don't render all the possible colors

XMLWordPrintable

    • Confirmed
    • Particles

      The Bug:

      Jukeboxes now produce a musical note particle when playing a disc, the same one the Noteblock uses. It cycles through a few colors, but it doesn't seem to utilize all of the available ones, seemingly sticking to only warmer colors of the spectrum.

      This behavior can be seen here, where a Noteblock is shown with every possible color the particle can utilize, while the jukebox only seems to do warmer colors:

      JukeboxNotes.mp4

      Code Analysis (Yarn Mappings) Thanks to haykam:

      The following code calculates the jukebox particle color:

      world.getRandom().nextInt(4) / 24f
      

      For comparison, the following code calculates the note block particle color:

      Math.pow(2, (note - 12) / 12d) / 24f
      

      As a result, note blocks' particle color ranges from 0 to 0.04166666667 while jukeboxes' particle color ranges from 0 to 0.125. Also note that note blocks' particle colors have 24 steps while jukeboxes' particle colors have only 4 steps.

      Steps to Reproduce:

      1. Play a Jukebox in the 23w06a+
      2. Watch the particles it produces
      3. Compare it to the Noteblock's particles, and notice how the jukebox only ever displays a few of the possible colors. Namely only "warm" colors.

            Unassigned Unassigned
            DiamondDragon721 Orbic
            Votes:
            3 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: