Exemplo n.º 1
0
  private static void handleModCheck(Packet230ModLoader packet230modloader) {
    Packet230ModLoader packet230modloader1 = new Packet230ModLoader();
    packet230modloader1.modId = "ModLoaderMP".hashCode();
    packet230modloader1.packetType = 0;
    packet230modloader1.dataString = new String[ModLoader.getLoadedMods().size()];
    for (int i = 0; i < ModLoader.getLoadedMods().size(); i++) {
      packet230modloader1.dataString[i] = ((BaseMod) ModLoader.getLoadedMods().get(i)).toString();
    }

    sendPacket(packet230modloader1);
  }
Exemplo n.º 2
0
 public static void sendKey(BaseModMp basemodmp, int i) {
   if (!hasInit) {
     initializePrivate();
   }
   if (basemodmp == null) {
     IllegalArgumentException illegalargumentexception =
         new IllegalArgumentException("baseModMp cannot be null.");
     ModLoader.getLogger().throwing("ModLoaderMp", "SendKey", illegalargumentexception);
     ModLoader.throwException("baseModMp cannot be null.", illegalargumentexception);
   } else {
     Packet230ModLoader packet230modloader = new Packet230ModLoader();
     packet230modloader.modId = "ModLoaderMP".hashCode();
     packet230modloader.packetType = 1;
     packet230modloader.dataInt = (new int[] {basemodmp.getId(), i});
     sendPacket(packet230modloader);
   }
 }
Exemplo n.º 3
0
 public static void sendPacket(BaseModMp basemodmp, Packet230ModLoader packet230modloader) {
   if (!hasInit) {
     initializePrivate();
   }
   if (basemodmp == null) {
     IllegalArgumentException illegalargumentexception =
         new IllegalArgumentException("baseModMp cannot be null.");
     ModLoader.getLogger().throwing("ModLoaderMp", "SendPacket", illegalargumentexception);
     ModLoader.throwException("baseModMp cannot be null.", illegalargumentexception);
   } else {
     packet230modloader.modId = basemodmp.getId();
     sendPacket(packet230modloader);
   }
 }