> For the complete documentation index, see [llms.txt](https://wiki.aegis-mine.ru/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.aegis-mine.ru/modifications/sozdanie-kontenta/crafttweaker/minecraft-1.16.5/startovye-predmety.md).

# Стартовые предметы

Используя мод-дополнение <mark style="color:blue;">**InitialInventory**</mark>, Вы можете установить предметы, выдаваемые в начале игры.

Сначала необходимо импортировать группы мода:

```java
import mods.initialinventory.InvHandler;
```

Затем можно добавлять предметы. Ниже приведены простые формы для добавления предметов: `InvHandler.addStartingItem(name, item);` или `InvHandler.addStartingItem(name, item, index);`

где\
\&#xNAN;*<mark style="color:blue;">**name**</mark>* – имя функции добавления,\
\&#xNAN;*<mark style="color:blue;">**item**</mark>* – выдаваемый предмет,\
\&#xNAN;*<mark style="color:blue;">**index**</mark>* – дополнительный параметр номера слота в инвентаре (индексация слотов начинается с 0).

<div align="left"><figure><img src="/files/W0fWOjuF0U5b1RVKeIp0" alt=""><figcaption><p>Индексация слотов</p></figcaption></figure></div>

Ниже приведены примеры: первый выдает 3 яблока, а второй - каменную лопату в слот с индексом 5.

```java
import mods.initialinventory.InvHandler;

InvHandler.addStartingItem("apples", <item:minecraft:apple> * 3);
InvHandler.addStartingItem("stone_shovel", <item:minecraft:stone_shovel>, 5);
```

<figure><img src="/files/WjiCpIzXMaaccIoWkfav" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://wiki.aegis-mine.ru/modifications/sozdanie-kontenta/crafttweaker/minecraft-1.16.5/startovye-predmety.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
