Skip to content

Commit 6219a87

Browse files
committed
feat: diff-based line starter updates
1 parent 6dc03cb commit 6219a87

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

src/main/proto/clientbound_player.proto

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ message S2CPlayerSwitchMode {
3535
PlayerMode mode = 1; // The mode the player is in.
3636
}
3737

38-
// Sent when the player opens a code chest.
38+
// Represents a reference to an action and its arguments,
39+
// sent when the player opens a code chest and bundled in other messages.
3940
message S2CChestReference {
4041
// Represents a value type.
4142
enum Value {

src/main/proto/clientbound_plot.proto

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,27 @@ message S2CMultiCodeOperationsResult {
8686
repeated S2CCodeOperationResult results = 1; // The results of all operations requested.
8787
}
8888

89-
// Sent when the player joins a plot or when the line starters change,
89+
// Represents a code line starter in the plot.
90+
message CodeLineStarter {
91+
WorldLocation location = 1; // The location of the line starter.
92+
optional S2CChestReference chest = 2; // The action reference.
93+
}
94+
95+
// Sent when the player joins a plot,
9096
// requires the player to have developer permissions on the plot.
9197
message S2CPlotLineStarters {
92-
message CodeLineStarter {
93-
WorldLocation location = 1;
94-
optional S2CChestReference chest = 2;
95-
}
98+
repeated CodeLineStarter line_starter = 1; // The line starters on the plot.
99+
}
96100

97-
repeated CodeLineStarter line_starter = 1;
101+
// Sent when a line starter is added or removed from the plot,
102+
// requires the player to have developer permissions on the plot.
103+
message S2CPlotLineStarterUpdate {
104+
enum Action {
105+
ADD = 0; // A line starter was added.
106+
REMOVE = 1; // A line starter was removed.
107+
}
108+
CodeLineStarter line_starter = 1; // The line starter that was added or removed.
109+
Action action = 2; // The action performed.
98110
}
99111

100112
// Sent when the plot finishes a lag measurement,

0 commit comments

Comments
 (0)