File tree Expand file tree Collapse file tree
src/main/java/com/circulation/circulation_networks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -416,9 +416,6 @@ public void initGrid() {
416416
417417 var nbts = new ConcurrentLinkedQueue <NBTTagCompound >();
418418
419- @ Desugar
420- record GridEntry (int dimId , Grid grid ) {}
421-
422419 var entries = new ConcurrentLinkedQueue <GridEntry >();
423420 Arrays .stream (files ).parallel ().forEach (file -> {
424421 try {
@@ -427,6 +424,7 @@ record GridEntry(int dimId, Grid grid) {}
427424 int dimId = nbt .getInteger ("dim" );
428425 if (!DimensionManager .isDimensionRegistered (dimId )) return ;
429426 var grid = Grid .deserialize (nbt );
427+ if (grid == null ) return ;
430428 entries .add (new GridEntry (dimId , grid ));
431429 } catch (IOException ignored ) {
432430 }
@@ -451,4 +449,8 @@ record GridEntry(int dimId, Grid grid) {}
451449 }
452450 nextGridId = maxId + 1 ;
453451 }
452+
453+ @ Desugar
454+ private record GridEntry (int dimId , IGrid grid ) {
455+ }
454456}
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ public static Grid deserialize(NBTTagCompound nbt) {
3737 var nodeNbt = (NBTTagCompound ) nbtBase ;
3838 var node = RegistryNodes .deserialize (nodeNbt );
3939 if (node != null ) {
40+ node .setGrid (grid );
4041 node .setActive (true );
4142 grid .nodes .add (node );
4243 posMap .put (nodeNbt .getLong ("pos" ), node );
You can’t perform that action at this time.
0 commit comments