You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Change misleading comments
The previous javadoc were more confusing than anything. I think this is better? Still dislike the naming of the targets() method considering those are the senders and not the receivers but oh well
* Remove wrong docs
Copy file name to clipboardexpand all lines: annotations/src/main/java/mindustry/annotations/Annotations.java
+7-9
Original file line number
Diff line number
Diff line change
@@ -182,18 +182,16 @@ public enum PacketPriority{
182
182
183
183
/** A set of two booleans, one specifying server and one specifying client. */
184
184
publicenumLoc{
185
-
/** Method can only be invoked on the client from the server. */
185
+
/** Server only. */
186
186
server(true, false),
187
-
/** Method can only be invoked on the server from the client. */
187
+
/** Client only. */
188
188
client(false, true),
189
-
/** Method can be invoked from anywhere */
189
+
/** Both server and client. */
190
190
both(true, true),
191
191
/** Neither server nor client. */
192
192
none(false, false);
193
193
194
-
/** If true, this method can be invoked ON clients FROM servers. */
195
194
publicfinalbooleanisServer;
196
-
/** If true, this method can be invoked ON servers FROM clients. */
197
195
publicfinalbooleanisClient;
198
196
199
197
Loc(booleanserver, booleanclient){
@@ -222,16 +220,16 @@ public enum Variant{
222
220
@Target(ElementType.METHOD)
223
221
@Retention(RetentionPolicy.SOURCE)
224
222
public @interface Remote{
225
-
/** Specifies the locations from which this method can be invoked. */
223
+
/** Specifies the locations from which this method can cause remote invocations (This -> Remote) [Default: Server -> Client]. */
226
224
Loctargets() defaultLoc.server;
227
225
228
-
/** Specifies which methods are generated. Only affects server-to-client methods. */
226
+
/** Specifies which methods are generated. Only affects server-to-client methods (Server -> Client(s)) [Default: Server -> Client & Server -> All Clients]. */
229
227
Variantvariants() defaultVariant.all;
230
228
231
-
/** The local locations where this method is called locally, when invoked. */
229
+
/** The locations where this method is called locally, when invoked locally (This -> This) [Default: No local invocations]. */
232
230
Loccalled() defaultLoc.none;
233
231
234
-
/** Whether to forward this packet to all other clients upon receival. Client only. */
232
+
/** Whether the server should forward this packet to all other clients upon receival from a client (Client -> Server -> Other Clients). [Default: Don't Forward Client Invocations] */
0 commit comments