Jump to content

Vali_du_68

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by Vali_du_68

  1. Hello, I am developing a mod for Minecraft 1.16.5 and Forge, and in order to add a functionality, I need to retrieve some information from a json file located at this address: "\Mod Name\src\main\resources\data\modid\equivalencies\item_prices.json". During some tests in an auxiliary test class, which did not require the game to run, I successfully retrieved information from this file using a relative path (directly from the mod folder), but when I implemented this code in the actual mod code, I have a NoSuchFileException. I also have tried to use the relative path of that json file from the location of the actual class that will be using that file, but I still have the same exception. So, I was wondering, where exactly is the starting point for the relative path to the json file, and how to find it? Or, even better, how to read that file the most efficiently? Thank you in advance for your answers. PS: Sorry for my English...
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.