1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-10-30 13:13:00 +00:00

Do not instantiate ServerComputer instances in the peripheral provider

Instead we create a ComputerProxy, which delegates methods to the
ServerComputer or TileComputerBase, depending on which one exists.
This commit is contained in:
SquidDev
2017-09-15 18:58:13 +01:00
parent 7a916ed8c2
commit fbbfe33e21
7 changed files with 137 additions and 8 deletions

View File

@@ -45,12 +45,12 @@ public class DefaultPeripheralProvider implements IPeripheralProvider
{
if( !((TileTurtle)tile).hasMoved() )
{
return new ComputerPeripheral( "turtle", computerTile.createServerComputer() );
return new ComputerPeripheral( "turtle", computerTile.createProxy() );
}
}
else
{
return new ComputerPeripheral( "computer", computerTile.createServerComputer() );
return new ComputerPeripheral( "computer", computerTile.createProxy() );
}
}
}