예제 #1
0
        public virtual List <WatchableObject> GetChangedObjects()
        {
            List <WatchableObject> arraylist = null;

            if (objectChanged)
            {
                System.Collections.IEnumerator iterator = watchedObjects.Values.GetEnumerator();
                do
                {
                    if (!iterator.MoveNext())
                    {
                        break;
                    }
                    net.minecraft.src.WatchableObject watchableobject = (net.minecraft.src.WatchableObject
                                                                         )iterator.Current;
                    if (watchableobject.GetWatching())
                    {
                        watchableobject.SetWatching(false);
                        if (arraylist == null)
                        {
                            arraylist = new List <WatchableObject>();
                        }
                        arraylist.Add(watchableobject);
                    }
                }while (true);
            }
            objectChanged = false;
            return(arraylist);
        }
예제 #2
0
 public virtual void UpdateObject(int i, object obj)
 {
     net.minecraft.src.WatchableObject watchableobject = (net.minecraft.src.WatchableObject
                                                          )watchedObjects[i];
     if (!obj.Equals(watchableobject.GetObject()))
     {
         watchableobject.SetObject(obj);
         watchableobject.SetWatching(true);
         objectChanged = true;
     }
 }