diff --git a/src/main/java/com/troblecodings/signals/signalbox/SignalBoxTileEntity.java b/src/main/java/com/troblecodings/signals/signalbox/SignalBoxTileEntity.java index 4d33e7b80..ee4f86a20 100644 --- a/src/main/java/com/troblecodings/signals/signalbox/SignalBoxTileEntity.java +++ b/src/main/java/com/troblecodings/signals/signalbox/SignalBoxTileEntity.java @@ -7,6 +7,7 @@ import com.troblecodings.signals.blocks.BasicBlock; import com.troblecodings.signals.blocks.Signal; import com.troblecodings.signals.core.LoadHolder; +import com.troblecodings.signals.core.RedstoneUpdatePacket; import com.troblecodings.signals.core.StateInfo; import com.troblecodings.signals.core.StateLoadHolder; import com.troblecodings.signals.enums.LinkType; @@ -85,6 +86,10 @@ public boolean link(final BlockPos pos, final NBTTagCompound tag) { (BasicBlock) block, type); } + public void updateInput(final RedstoneUpdatePacket update) { + SignalBoxHandler.updateInput(new StateInfo(world, pos), update); + } + @Override public void onLoad() { grid.setPosAndWorld(pos, world); @@ -94,13 +99,11 @@ public void onLoad() { SignalBoxHandler.readTileNBT(identifier, copy == null ? new NBTWrapper() : copy, grid.getModeGrid()); SignalBoxHandler.loadSignals(identifier); - System.out.println("Loaded [" + identifier + "]!"); } @Override public void onChunkUnload() { SignalBoxHandler.unloadSignals(new StateInfo(world, pos)); - System.out.println("Unloaded [" + new StateInfo(world, pos) + "]!"); } @Override diff --git a/src/main/java/com/troblecodings/signals/tileentitys/RedstoneIOTileEntity.java b/src/main/java/com/troblecodings/signals/tileentitys/RedstoneIOTileEntity.java index e0c5cb337..beaa15b40 100644 --- a/src/main/java/com/troblecodings/signals/tileentitys/RedstoneIOTileEntity.java +++ b/src/main/java/com/troblecodings/signals/tileentitys/RedstoneIOTileEntity.java @@ -66,7 +66,7 @@ public void sendToAll() { final RedstoneUpdatePacket update = new RedstoneUpdatePacket(world, pos, power, (RedstoneInput) getBlockType()); linkedPositions.forEach(pos -> loadChunkAndGetTile(SignalBoxTileEntity.class, world, pos, - (_u1, _u2) -> SignalBoxHandler.updateInput(new StateInfo(world, pos), update))); + (tile, _u) -> tile.updateInput(update))); linkedSignalController.forEach(pos -> { loadChunkAndGetTile(SignalControllerTileEntity.class, world, pos, (tile, _u) -> tile.updateFromRSInput());