예제 #1
0
 /// <summary>
 /// Sets given item stack with given key
 /// </summary>
 /// <param name="key"></param>
 /// <param name="itemstack"></param>
 public void SetItemstack(string key, ItemStack itemstack)
 {
     lock (attributesLock)
     {
         attributes[key] = new ItemstackAttribute(itemstack);
     }
 }
예제 #2
0
        internal bool Equals(IWorldAccessor worldForResolve, IAttribute attr, string[] ignorePaths)
        {
            if (!(attr is ItemstackAttribute))
            {
                return(false);
            }

            ItemstackAttribute stackAttr = (ItemstackAttribute)attr;

            return
                ((stackAttr.value == null && value == null) ||
                 (stackAttr.value != null && stackAttr.value.Equals(worldForResolve, value, ignorePaths))
                );
        }