Annotation system bugs fixed
This commit is contained in:
@@ -1,5 +1,18 @@
|
||||
package io.anuke.mindustry.net;
|
||||
|
||||
import io.anuke.annotations.Annotations.Remote;
|
||||
import io.anuke.mindustry.entities.Player;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
|
||||
public class NetEvents {
|
||||
|
||||
@Remote(unreliable = true, one = true)
|
||||
public static void callClientMethod(int something, Player player, String str, boolean bool){
|
||||
System.out.println("Called " + something + " ? " + bool);
|
||||
}
|
||||
|
||||
@Remote(local = false)
|
||||
public static void someOtherMethod(Tile tile){
|
||||
System.out.println("Called with tile " + tile);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package io.anuke.mindustry.net;
|
||||
import com.badlogic.gdx.utils.TimeUtils;
|
||||
import io.anuke.mindustry.Vars;
|
||||
import io.anuke.mindustry.entities.Player;
|
||||
import io.anuke.mindustry.gen.RemoteReadClient;
|
||||
import io.anuke.mindustry.net.Packet.ImportantPacket;
|
||||
import io.anuke.mindustry.net.Packet.UnimportantPacket;
|
||||
|
||||
@@ -38,6 +39,7 @@ public class Packets {
|
||||
if(Net.client()){
|
||||
//TODO implement
|
||||
//CallClient.readPacket(buffer, type);
|
||||
RemoteReadClient.readPacket(buffer, type);
|
||||
}else{
|
||||
byte[] bytes = new byte[writeLength];
|
||||
buffer.get(bytes);
|
||||
|
||||
Reference in New Issue
Block a user