[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: PNG File image-2022-01-16-10-06-13-344.png     PNG File image-2022-01-16-10-06-40-867.png    
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
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/pull-requests/993/overview

 

Generated at Fri Apr 11 16:00:50 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.