Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-7014

Loot table doesn't get updated when sheep is redyed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • None
    • This server is running CraftBukkit version git-Bukkit-7bc728a (MC: 1.18.2) (Implementing API version 1.18.2-R0.1-SNAPSHOT)
    • Yes

      If a sheep is dyed and a loot table is generated, then that loot table will contain the wool with the colour that corresponds to the sheep. However, if that sheep is dyed to a different colour, the loot table doesn't get updated to reflect that.

      Tested with code:

      LootContext lootContext = new LootContext.Builder(sheep.getLocation()).lootedEntity(sheep).build();
      Collection<ItemStack> loot = sheep.getLootTable().populateLoot(ThreadLocalRandom.current(), lootContext);
      for (ItemStack itemStack : loot) {
          if (Tag.WOOL.isTagged(itemStack.getType())) {
              getLogger().info(itemStack.getType().toString());
          }
      } 

            Unassigned Unassigned
            antiPerson Nathan (antiPerson)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: