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

Attribute LootTableSeed missing for generated containers with attached LootTable

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • None
    • Any

    • This server is running CraftBukkit version 3937-Bukkit-864f616 (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT)
    • Yes

      I recently noticed that containers with attached LootTables in structures no longer store the LootTableSeed attribute, which results in non deterministic container content(when recreating a world with the same seed and reopening the same chest its contents will be different, which isn't vanilla behaviour).

      I first noticed the bug in 1.20.2 builds for paper but the current spigot and craftbukkit builds show the same behaviour, while the vanilla client/server still stores the LootTableSeed. So i would assume the bug was introduced by bukkit/craftbukkit.

      Steps to reproduce:

      • generate a new world using the newest craftbukkit or spigot 1.20.2 jar
      • find a structure with containers
      • pick one container(without opening it)
      • save the world
      • open the corresponding region file and search for the container
      • the container has the LootTable attribute attached, but is missing the LootTableSeed attribute

      Alternatively:

      • generate a new world using the newest craftbukkit or spigot 1.20.2 jar
      • find a structure with containers
      • pick one container
      • open the container, write down its contents
      • stop the server
      • delete the corresponding region folder/file
      • restart the server
      • reopen the container, write down its contents
      • compare the container content from both samples

      When recreating these steps on a vanilla 1.20.2 server the LootTableSeed attribute is present.

      For some additional context:
      The bug was introduced to paper in https://github.com/PaperMC/paper/commit/4cdbb0c86c40f5ff93a9a7cdca3102636b35b6d4(1.20 build #204 still works, while 1.20 build #205 doesn't), so one of the merged changes will be its cause. I don't seem to be able to find old craftbukkit or spigot builds, so i'm unable to pin it down any further.

            DerFrZocker Marvin Rieple
            Dlr1B Simon Stroh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: