mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-11-18 14:15:12 +00:00
Sync computer state through TE data
Previously we would send computer state (labels, id, on/off) through the ClientComputer rather than as part of the TE description. While this mostly worked fine, it did end up making things more complex than they needed to be. We sync most data to the tile each tick, so there's little risk of things getting out of date.
This commit is contained in:
@@ -407,7 +407,7 @@ public abstract class ComputerCraftProxyCommon implements IComputerCraftProxy
|
||||
} );
|
||||
|
||||
ComputerClientMessage.register( ComputerDataClientMessage::new, ( computer, packet ) ->
|
||||
computer.setState( packet.getComputerId(), packet.getLabel(), packet.getState(), packet.getUserData() ) );
|
||||
computer.setState( packet.getState(), packet.getUserData() ) );
|
||||
|
||||
ComputerClientMessage.register( ComputerTerminalClientMessage::new, ( computer, packet ) ->
|
||||
computer.readDescription( packet.getTag() ) );
|
||||
|
||||
Reference in New Issue
Block a user