Change misleading comments (#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
This commit is contained in:
buthed010203
2025-02-06 13:40:14 -05:00
committed by GitHub
parent dad69a7b2a
commit 62fb4cc2b8

View File

@ -182,18 +182,16 @@ public class Annotations{
/** A set of two booleans, one specifying server and one specifying client. */ /** A set of two booleans, one specifying server and one specifying client. */
public enum Loc{ public enum Loc{
/** Method can only be invoked on the client from the server. */ /** Server only. */
server(true, false), server(true, false),
/** Method can only be invoked on the server from the client. */ /** Client only. */
client(false, true), client(false, true),
/** Method can be invoked from anywhere */ /** Both server and client. */
both(true, true), both(true, true),
/** Neither server nor client. */ /** Neither server nor client. */
none(false, false); none(false, false);
/** If true, this method can be invoked ON clients FROM servers. */
public final boolean isServer; public final boolean isServer;
/** If true, this method can be invoked ON servers FROM clients. */
public final boolean isClient; public final boolean isClient;
Loc(boolean server, boolean client){ Loc(boolean server, boolean client){
@ -222,16 +220,16 @@ public class Annotations{
@Target(ElementType.METHOD) @Target(ElementType.METHOD)
@Retention(RetentionPolicy.SOURCE) @Retention(RetentionPolicy.SOURCE)
public @interface Remote{ public @interface Remote{
/** Specifies the locations from which this method can be invoked. */ /** Specifies the locations from which this method can cause remote invocations (This -> Remote) [Default: Server -> Client]. */
Loc targets() default Loc.server; Loc targets() default Loc.server;
/** Specifies which methods are generated. Only affects server-to-client methods. */ /** Specifies which methods are generated. Only affects server-to-client methods (Server -> Client(s)) [Default: Server -> Client & Server -> All Clients]. */
Variant variants() default Variant.all; Variant variants() default Variant.all;
/** The local locations where this method is called locally, when invoked. */ /** The locations where this method is called locally, when invoked locally (This -> This) [Default: No local invocations]. */
Loc called() default Loc.none; Loc called() default Loc.none;
/** Whether to forward this packet to all other clients upon receival. Client only. */ /** 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] */
boolean forward() default false; boolean forward() default false;
/** /**