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

Trades Not Randomized for Farmer Villager

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Fixed
    • Minecraft 14w07a, Minecraft 14w08a, Minecraft 14w10b, Minecraft 14w10c, Minecraft 14w11b, Minecraft 14w20b, Minecraft 14w21b, Minecraft 1.8, Minecraft 15w40b
    • Minecraft 16w33a
    • None
    • Confirmed

    Description

      The apple and cookie trades for farmer villagers are not randomized correctly, always yielding 5 and 6 items respectively instead of the random ranges [5..7] and [6..10].

      The reason seems to be that the limits of the ranges are accidentally flipped around in the code, making the ranges empty because the lower limit is greater than the upper one:

      minecraft_server.1.8.jar/agp.class#557
        private static final agw[][][][] bA = {
          {
            { // farmer
              [...],
              { new agr(alq.a(aty.bk), new agx(7, 12)), new agv(amk.e, new agx(-5, -7)) },
              { new agv(amk.bc, new agx(-6, -10)), new agv(amk.aZ, new agx(1, 1)) }
            },
            [...]
          },
          [...]
        };
      

      The ranges should probably be new agx(-7, -5) and new agx(-10, -6).

      Attachments

        Activity

          People

            FruBasilicum [Mojang] Agnes Larsson
            leo_woerteler Leo W├Ârteler
            Votes:
            5 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              CHK: