Skip to content

Commit 62fb4cc

Browse files
authored
Change misleading comments (Anuken#6632)
* 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
1 parent dad69a7 commit 62fb4cc

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

annotations/src/main/java/mindustry/annotations/Annotations.java

+7-9
Original file line numberDiff line numberDiff line change
@@ -182,18 +182,16 @@ public enum PacketPriority{
182182

183183
/** A set of two booleans, one specifying server and one specifying client. */
184184
public enum Loc{
185-
/** Method can only be invoked on the client from the server. */
185+
/** Server only. */
186186
server(true, false),
187-
/** Method can only be invoked on the server from the client. */
187+
/** Client only. */
188188
client(false, true),
189-
/** Method can be invoked from anywhere */
189+
/** Both server and client. */
190190
both(true, true),
191191
/** Neither server nor client. */
192192
none(false, false);
193193

194-
/** If true, this method can be invoked ON clients FROM servers. */
195194
public final boolean isServer;
196-
/** If true, this method can be invoked ON servers FROM clients. */
197195
public final boolean isClient;
198196

199197
Loc(boolean server, boolean client){
@@ -222,16 +220,16 @@ public enum Variant{
222220
@Target(ElementType.METHOD)
223221
@Retention(RetentionPolicy.SOURCE)
224222
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]. */
226224
Loc targets() default Loc.server;
227225

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]. */
229227
Variant variants() default Variant.all;
230228

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]. */
232230
Loc called() default Loc.none;
233231

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] */
235233
boolean forward() default false;
236234

237235
/**

0 commit comments

Comments
 (0)