1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-09-03 02:47:56 +00:00

Configure ServerComputer via a Properties builder

We currently need to pass a whole bunch of arguments to a ServerComputer
in order to construct it, and if we implement #1814, this will get a
whole lot worse. Instead, we now pass most parameters (computer id,
family, label, term size, components) via a separate Properties class,
much like Minecraft does for blocks and items.

I'm not wild about the design of the API here, but I think it's a step
in the right direction.
This commit is contained in:
Jonathan Coates
2025-01-20 19:47:18 +00:00
parent 94ad6dab0e
commit dc969c5a78
10 changed files with 87 additions and 45 deletions

View File

@@ -19,8 +19,8 @@ import dan200.computercraft.api.ComputerCraftAPI;
*/
public interface WiredElement extends WiredSender {
/**
* Called when objects on the network change. This may occur when network nodes are added or removed, or when
* peripherals change.
* Called when peripherals on the network change. This may occur when network nodes are added or removed, or when
* peripherals are attached or detached from a modem.
*
* @param change The change which occurred.
* @see WiredNetworkChange