Loading chests with loot from loot table files?

Discussion in 'Spigot Plugin Development' started by robotnik, May 13, 2017.

  1. Hi, I am trying to figure out a good way to load some chests with randomized loot for my plugin, and I think loading up chests with loot using minecrafts own loot tables would be the perfect way to do it.

    Problem is I am not really sure if this is possible with just the spigot API. Would someone be able to point me into the right direction on how to accomplish this?
     
  2. I don´t think Spigot has an api for this.
    But (correct me if im wrong) these custom loot-tables are saved in each world in a json format, right?
    So what you could do is get the File path, read the json and create the chest on your own. Just something like an own loot-table reader.
     
  3. Yeah, it looks like I will have to find my own way of doing it them. Still, im really surprised there is not an API for this, especially with how custom items can be more complex.