Editing Dungeon Loot Tables

Discussion in 'Spigot Plugin Development' started by Computerdude3, Jun 2, 2017.

  1. I'd like to add a custom itemstack chance into dungeon loot. As far as I am aware, there is no spigot api for this. Does anyone know how to do this?
  2. it is changed using files in the server folder. In sinleplayer it is in the world folder
  3. Then how would you add ItemStacks? o_O
  4. editing those files and minecraft handles everything after that
  5. I mean through an itemstack generated by my plugin.
  6. oh, a non hard coded item you mean? You could use damage events to change dropped items. I don't think there is any other easy way to do it.
  7. Ok, thanks for replying.
  8. That is why i am here xD. And all developers that try to help
  9. Damage events should be for mob loot. You could use inventory events for changing structure loot. I will take some time tomorrow (o wait... today already. I really should sleep) to check if there is any other way.
    • Like Like x 1
  10. I found two things that may be something you can use. The first thing is the ChunckPopulateEvent. This gets called when a chunck is generated. The secodna thing you could use is a custom BlockPopulator. You could make it the same as the minecraft populater but change the chest content. I am not sure if this would work, but that is the only thing I think could work.