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

@@ -25,7 +25,7 @@ public class TowerSystem extends BaseGameSystem {
private TowerScheduleConfig towerScheduleConfig;
public synchronized void load(){
try (Reader fileReader = new InputStreamReader(DataLoader.load("TowerSchedule.json"))) {
try (Reader fileReader = DataLoader.loadReader("TowerSchedule.json")) {
towerScheduleConfig = Grasscutter.getGsonFactory().fromJson(fileReader, TowerScheduleConfig.class);
} catch (Exception e) {
Grasscutter.getLogger().error("Unable to load tower schedule config.", e);