    001    package net.minecraft.src;
    002
    003    import cpw.mods.fml.common.Side;
    004    import cpw.mods.fml.common.asm.SideOnly;
    005    import java.net.InetAddress;
    006    import java.util.ArrayList;
    007    import java.util.Collections;
    008    import java.util.Iterator;
    009    import java.util.List;
    010
    011    @SideOnly(Side.CLIENT)
    012    public class LanServerList
    013    {
    014        private ArrayList field_77555_b = new ArrayList();
    015        boolean field_77556_a;
    016
    017        public synchronized boolean func_77553_a()
    018        {
    019            return this.field_77556_a;
    020        }
    021
    022        public synchronized void func_77552_b()
    023        {
    024            this.field_77556_a = false;
    025        }
    026
    027        public synchronized List func_77554_c()
    028        {
    029            return Collections.unmodifiableList(this.field_77555_b);
    030        }
    031
    032        public synchronized void func_77551_a(String par1Str, InetAddress par2InetAddress)
    033        {
    034            String var3 = ThreadLanServerPing.func_77524_a(par1Str);
    035            String var4 = ThreadLanServerPing.func_77523_b(par1Str);
    036
    037            if (var4 != null)
    038            {
    039                boolean var5 = false;
    040                Iterator var6 = this.field_77555_b.iterator();
    041
    042                while (var6.hasNext())
    043                {
    044                    LanServer var7 = (LanServer)var6.next();
    045
    046                    if (var7.func_77488_b().equals(var4))
    047                    {
    048                        var7.updateLastSeen();
    049                        var5 = true;
    050                        break;
    051                    }
    052                }
    053
    054                if (!var5)
    055                {
    056                    this.field_77555_b.add(new LanServer(var3, var4));
    057                    this.field_77556_a = true;
    058                }
    059            }
    060        }
    061    }