Removed multi-class call generation

This commit is contained in:
Anuken
2018-07-26 15:24:48 -04:00
parent ea6f88b7f6
commit c1c82b451d
32 changed files with 128 additions and 153 deletions

View File

@@ -80,9 +80,6 @@ public class Annotations{
*/
boolean unreliable() default false;
/** The simple class name where this method is placed. */
String in() default "Call";
/** Priority of this event. */
PacketPriority priority() default PacketPriority.normal;
}

View File

@@ -35,6 +35,8 @@ public class RemoteMethodAnnotationProcessor extends AbstractProcessor{
private static final String readServerName = "RemoteReadServer";
/** Name of class that handles reading and invoking packets on the client. */
private static final String readClientName = "RemoteReadClient";
/**Simple class name of generated class name.*/
private static final String callLocation = "Call";
/** Processing round number. */
private int round;
@@ -102,15 +104,15 @@ public class RemoteMethodAnnotationProcessor extends AbstractProcessor{
}
//get and create class entry if needed
if(!classMap.containsKey(annotation.in())){
ClassEntry clas = new ClassEntry(annotation.in());
classMap.put(annotation.in(), clas);
if(!classMap.containsKey(callLocation)){
ClassEntry clas = new ClassEntry(callLocation);
classMap.put(callLocation, clas);
classes.add(clas);
Utils.messager.printMessage(Kind.NOTE, "Generating class '" + clas.name + "'.");
}
ClassEntry entry = classMap.get(annotation.in());
ClassEntry entry = classMap.get(callLocation);
//create and add entry
MethodEntry method = new MethodEntry(entry.name, Utils.getMethodName(element), annotation.targets(), annotation.variants(),