optimized the Lua func binding so that the script will not eval again

This commit is contained in:
Akka
2022-05-19 11:15:40 +08:00
committed by Melledy
parent a8f38ad995
commit bad853573c
7 changed files with 89 additions and 79 deletions

View File

@@ -26,7 +26,7 @@ public class WorldDataManager {
}
public synchronized void load(){
try(InputStream is = DataLoader.load("ChestReward.json", false); InputStreamReader isr = new InputStreamReader(is)) {
try(InputStream is = DataLoader.load("ChestReward.json"); InputStreamReader isr = new InputStreamReader(is)) {
List<ChestReward> chestReward = Grasscutter.getGsonFactory().fromJson(
isr,
TypeToken.getParameterized(List.class, ChestReward.class).getType());