[SPIGOT-6901] CraftLootTable / LootTable contains unused argument for fillInventory Created: 16/Jan/22 Updated: 16/Jan/22 Resolved: 16/Jan/22 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | Lauriichan | Assignee: | Doc |
Resolution: | Fixed | Votes: | 0 |
Labels: | API, CraftBukkit |
Attachments: |
![]() ![]() |
Version: | This server is running CraftBukkit version 3339-Spigot-3c40a6c-581df18 (MC: 1.18) (Implementing API version 1.18-R0.1-SNAPSHOT) |
Guidelines Read: | Yes |
Description |
Currently the documentation and api of the LootTable#fillInventory requires a java.util.Random as parameter. However that Random is never used which makes me question why do I have to provide a Non Null Random if the random itself is never used. Is that intended or did something change here over time? See also here in documentation |
Comments |
Comment by Doc [ 16/Jan/22 ] |
See the history of the class and the random param was never used but can be used... Then i create a PR for make the random param nullable and add support for use in fillInventory and in populateLoot for the LootTable class. https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/pull-requests/714/overview
|