Slimefun4 icon indicating copy to clipboard operation
Slimefun4 copied to clipboard

Piglin Barter Drops are Biased

Open JustAHuman-xD opened this issue 6 months ago โ€ข 0 comments

โ— Checklist

  • [x] I am using the official english version of Slimefun and did not modify the jar.
  • [x] I downloaded the official version from the new build site Blob Builds.
  • [x] I am using an up to date "DEV" (not "RC") version of Slimefun.
  • [x] I am aware that issues related to Slimefun addons need to be reported on their bug trackers and not here.
  • [x] I searched for similar open issues and could not find an existing bug report on this.

๐Ÿ“ Description

The piglin barter drop recipe type uses a hashset and iterates over it when generating the custom drop, the hash set, after its done being modified (post finalized event) will have a deterministic order for the runtime of the server.

Because of this, the items at the beginning of the iteration order have a bias towards being dropped.

๐Ÿ“‘ Reproduction Steps

Look at the code

๐Ÿ’ก Expected Behavior

Drops would be properly randomized always

๐Ÿ“ท Screenshots / Videos

No response

๐Ÿ“œ Server Log

No response

๐Ÿ“‚ /error-reports/ folder

No response

๐Ÿ’ป Server Software

Spigot

๐ŸŽฎ Minecraft Version

1.20.x

โญ Slimefun version

Image

๐Ÿงญ Other plugins

No response

JustAHuman-xD avatar Jun 10 '25 19:06 JustAHuman-xD