Solved Custom loot in mineshafts

Discussion in 'Plugin Development' started by Tim_M, Dec 17, 2021.

  1. Offline

    Tim_M

    Im adding custom loot to the game (I do this by checking if any chest the player opens has a loot table and the adding stuff), but I don't know how to do it in mineshafts since it's minecarte with chests and not chests. How can you get the chest and it's loot table from the minecart?

    Just wanted to say that I fixed it! Just use PlayerInteractEntityEvent and check if the interacted entity is a minecart, get it's loot table and done!
     
    Last edited: Jan 21, 2022 at 3:58 AM
  2. Offline

    KarimAKL

  3. Offline

    Tim_M

  4. Offline

    KarimAKL

    It's an entity, so you don't need an event to get it. However, the LootGenerateEvent might be what you're looking for.
     

Share This Page