From 5d539df99828c368a6222a1d7fe4e16a6a38aea5 Mon Sep 17 00:00:00 2001 From: Cedric Date: Tue, 21 Nov 2023 20:52:48 +0100 Subject: [PATCH] fix: linking list emptry --- .../signals/signalbox/SignalBoxTileEntity.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/troblecodings/signals/signalbox/SignalBoxTileEntity.java b/src/main/java/com/troblecodings/signals/signalbox/SignalBoxTileEntity.java index 68d83a10b..d5a464c96 100644 --- a/src/main/java/com/troblecodings/signals/signalbox/SignalBoxTileEntity.java +++ b/src/main/java/com/troblecodings/signals/signalbox/SignalBoxTileEntity.java @@ -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 @@ -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