Exemplo n.º 1
0
 public void sendPacketToTrackedPlayersAndTrackedEntity(Entity entity, Packet packet)
 {
     var entitytrackerentry = (EntityTrackerEntry) trackedEntityHashTable.lookup(entity.entityId);
     if (entitytrackerentry != null)
     {
         entitytrackerentry.sendPacketToTrackedPlayersAndTrackedEntity(packet);
     }
 }
Exemplo n.º 2
0
 public void sendPacket(Packet packet)
 {
     netManager.addToSendQueue(packet);
     field_22004_g = field_15_f;
 }
Exemplo n.º 3
0
 public override void registerPacket(Packet packet)
 {
     logger.warning(
         (new StringBuilder()).append(GetType()).append(" wasn't prepared to deal with a ").append(
             packet.GetType()).toString());
     kickPlayer("Protocol error, unexpected packet");
 }
Exemplo n.º 4
0
 public static void writePacket(Packet packet, DataOutputStream dataoutputstream)
 {
     dataoutputstream.write(packet.getPacketId());
     packet.writePacketData(dataoutputstream);
 }
Exemplo n.º 5
0
 public override void registerPacket(Packet packet)
 {
     kickUser("Protocol error");
 }
Exemplo n.º 6
0
 public void sendPacketToTrackedPlayers(Packet packet)
 {
     EntityPlayerMP entityplayermp;
     for (Iterator iterator = trackedPlayers.iterator();
          iterator.hasNext();
          entityplayermp.playerNetServerHandler.sendPacket(packet))
     {
         entityplayermp = (EntityPlayerMP) iterator.next();
     }
 }
Exemplo n.º 7
0
 public void sendPacketToTrackedPlayersAndTrackedEntity(Packet packet)
 {
     sendPacketToTrackedPlayers(packet);
     if (trackedEntity is EntityPlayerMP)
     {
         ((EntityPlayerMP) trackedEntity).playerNetServerHandler.sendPacket(packet);
     }
 }
Exemplo n.º 8
0
 public void func_12022_a(double d, double d1, double d2, double d3, Packet packet)
 {
     for (int i = 0; i < playerEntities.size(); i++)
     {
         var entityplayermp = (EntityPlayerMP) playerEntities.get(i);
         double d4 = d - entityplayermp.posX;
         double d5 = d1 - entityplayermp.posY;
         double d6 = d2 - entityplayermp.posZ;
         if (d4*d4 + d5*d5 + d6*d6 < d3*d3)
         {
             entityplayermp.playerNetServerHandler.sendPacket(packet);
         }
     }
 }
Exemplo n.º 9
0
 public bool sendPacketToPlayer(string s, Packet packet)
 {
     EntityPlayerMP entityplayermp = getPlayerEntity(s);
     if (entityplayermp != null)
     {
         entityplayermp.playerNetServerHandler.sendPacket(packet);
         return true;
     }
     else
     {
         return false;
     }
 }
Exemplo n.º 10
0
 public void sendPacketToAllPlayers(Packet packet)
 {
     for (int i = 0; i < playerEntities.size(); i++)
     {
         var entityplayermp = (EntityPlayerMP) playerEntities.get(i);
         entityplayermp.playerNetServerHandler.sendPacket(packet);
     }
 }
Exemplo n.º 11
0
        public void addToSendQueue(Packet packet)
        {
            if (m_isServerTerminating)
            {
                return;
            }

            lock (sendQueueLock)
            {
                sendQueueByteLength += packet.getPacketSize() + 1;
                if (packet.isChunkDataPacket)
                {
                    chunkDataPackets.add(packet);
                }
                else
                {
                    dataPackets.add(packet);
                }
            }
        }
Exemplo n.º 12
0
 public void func_776_a(Packet packet)
 {
     for (int i = 0; i < field_1072_b.size(); i++)
     {
         var entityplayermp = (EntityPlayerMP) field_1072_b.get(i);
         if (entityplayermp.field_420_ah.contains(field_1069_e))
         {
             entityplayermp.playerNetServerHandler.sendPacket(packet);
         }
     }
 }