Skip to content

Commit

Permalink
fix: linking list emptry
Browse files Browse the repository at this point in the history
  • Loading branch information
Uhutown committed Nov 21, 2023
1 parent d541dbc commit 5d539df
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ public void loadWrapper(final NBTWrapper wrapper) {
grid.read(wrapper.getWrapper(GUI_TAG));
grid.readPathways(wrapper);
copy = wrapper.copy();
if (level != null) {
onLoad();
}
}

@Override
Expand Down Expand Up @@ -98,14 +95,14 @@ public boolean link(final BlockPos pos, final CompoundTag tag) {
@Override
public void onLoad() {
grid.setTile(this);
grid.onLoad();
if (level.isClientSide) {
return;
}
grid.onLoad();
final StateInfo identifier = new StateInfo(level, worldPosition);
SignalBoxHandler.putGrid(identifier, grid);
SignalBoxHandler.loadSignals(identifier);
SignalBoxHandler.readTileNBT(identifier, copy == null ? new NBTWrapper() : copy);
SignalBoxHandler.loadSignals(identifier);
}

@Override
Expand Down

0 comments on commit 5d539df

Please sign in to comment.