Package forestry.core.network

Examples of forestry.core.network.ClassMap


  /* NETWORK */
  @Override
  public PacketPayload getPacketPayload() {
    if (!ClassMap.classMappers.containsKey(this.getClass()))
      ClassMap.classMappers.put(this.getClass(), new ClassMap(this.getClass()));

    ClassMap classmap = ClassMap.classMappers.get(this.getClass());
    PacketPayload payload = new PacketPayload(classmap.intSize, classmap.floatSize, classmap.stringSize);

    try {
      classmap.setData(this, payload.intPayload, payload.floatPayload, payload.stringPayload, new IndexInPayload(0, 0, 0));
    } catch (IllegalAccessException e) {
      e.printStackTrace();
    }

    return payload;
View Full Code Here


    if (payload.isEmpty())
      return;

    if (!ClassMap.classMappers.containsKey(this.getClass()))
      ClassMap.classMappers.put(this.getClass(), new ClassMap(this.getClass()));

    ClassMap classmap = ClassMap.classMappers.get(this.getClass());

    try {
      classmap.fromData(this, payload.intPayload, payload.floatPayload, payload.stringPayload, new IndexInPayload(0, 0, 0));
    } catch (Exception ex) {
      ex.printStackTrace();
    }
  }
View Full Code Here

  public static int WORK_CYCLES = 4;

  @Override
  public PacketPayload getPacketPayload() {
    if (!ClassMap.classMappers.containsKey(this.getClass()))
      ClassMap.classMappers.put(this.getClass(), new ClassMap(this.getClass()));

    ClassMap classmap = ClassMap.classMappers.get(this.getClass());
    PacketPayload payload = new PacketPayload(classmap.intSize, classmap.floatSize, classmap.stringSize);

    try {
      classmap.setData(this, payload.intPayload, payload.floatPayload, payload.stringPayload, new IndexInPayload(0, 0, 0));
    } catch (Exception ex) {
      ex.printStackTrace();
    }

    return payload;
View Full Code Here

    if (payload.isEmpty())
      return;

    if (!ClassMap.classMappers.containsKey(this.getClass()))
      ClassMap.classMappers.put(this.getClass(), new ClassMap(this.getClass()));

    ClassMap classmap = ClassMap.classMappers.get(this.getClass());

    try {
      classmap.fromData(this, payload.intPayload, payload.floatPayload, payload.stringPayload, new IndexInPayload(0, 0, 0));
    } catch (Exception ex) {
      ex.printStackTrace();
    }
  }
View Full Code Here

TOP

Related Classes of forestry.core.network.ClassMap

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.