Add a loadReader helper function to DataLoader

Also minor name changing on a few DataLoader methods
This commit is contained in:
Melledy
2022-07-20 02:26:02 -07:00
parent f22b92b08f
commit 55541fa1da
14 changed files with 45 additions and 23 deletions

View File

@@ -46,7 +46,7 @@ public class DungeonChallenge extends WorldChallenge {
public static void initialize() {
// Read the data we need for dungeon rewards drops.
try (Reader fileReader = new InputStreamReader(DataLoader.load("DungeonDrop.json"))) {
try (Reader fileReader = DataLoader.loadReader("DungeonDrop.json")) {
List<DungeonDrop> dungeonDropList = Grasscutter.getGsonFactory().fromJson(fileReader, TypeToken.getParameterized(Collection.class, DungeonDrop.class).getType());
for (DungeonDrop entry : dungeonDropList) {