You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: questions/giveitembedrock.md
+20-10
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,25 @@ Using `/give` on bedrock only works for "basic" items, without any alterations l
7
7
> [!NOTE]
8
8
> You can use external programs (such as world editors or "hacks") to get custom items, that are impossible to get, such as items with impossible enchantments.
9
9
10
-
Thus, a different method needs to be followed, of which there are two (three) common ones. The last one in the list is probably the best one currently available.
10
+
Thus, a different method needs to be followed, of which there are multiple common ones.
11
+
12
+
### Loot Table
13
+
14
+
**_The best method currently available, but doesn't work for all kinds of custom entity data._**
15
+
16
+
You can use [loot tables](https://wiki.bedrock.dev/loot/loot-tables.html) to define items to be given and then use the [`/loot`](https://minecraft.wiki/w/Commands/loot) command to give it/them to a player.
17
+
18
+
Thanks to [loot table functions](https://wiki.bedrock.dev/loot/item-functions.html) you can modify many things about these items, not only setting amount and data value, but name, lore, spawn eggs, enchantments, book contents and much more.
19
+
20
+
21
+
### Structure command
22
+
23
+
**_The best method currently available if you cannot use loot tables_**
24
+
25
+
Same as the structure block method below, but instead of loading it with a structureblock and teleporting the item, you load it using the [`/structure`](https://minecraft.wiki/Commands/structure) command. It has the advantage over the block method that you don't need to worry about the whole redstone block setting and the issues that come with that, you can just load the structure directly at the player in question and be done with it. It also is easy to use with add-ons as no blocks are needed and the structure can be distributed with the add-on by putting it into the `bp/structures/` folder.
26
+
27
+
**Make sure to save the structure with a structure void block inside, or the air might override whatever block the player is currently standing on.**
28
+
11
29
12
30
### Physical chest
13
31
@@ -27,18 +45,10 @@ Step 6: Has the advantage that you don't need to fiddle with the language files
27
45
28
46
Instead of storing the item in a chest, you store it in a structure block by saving a 1x1 structure that consists of just air and the item entities. So the step by step guide is:
29
47
30
-
1. throw item(s) on top of a structure block, save the structure with entities (probably as a 1x1x1 sized structure).
48
+
1. throw the item(s) on top of a structure block, save the structure with entities (probably as a 1x1x1 sized structure).
31
49
2. change the structure block to load mode
32
50
3. whenever you need it, setblock a redstone block next to the structure block (and remove it again a tick later)
33
51
4. teleport the item entities to the player
34
52
35
53
This has the advantage that you don't have to remove the container entity after you broke it and that the items don't have a pickup delay anymore.
36
54
It has the disadvantage that it can take a tick or two for the structure to be loaded properly and thus for the item entity to appear, which means you need a delay in your functions.
37
-
38
-
#### Structure command
39
-
40
-
**_Probably the best method currently available_**
41
-
42
-
Same as the structure block method, but instead of loading it with a structureblock, you load it using the [`/structure`](https://minecraft.wiki/Commands/structure) command. It has the advantage over the block method that you don't need to worry about the whole redstone block setting and the issues that come with that, you can just load the structure directly at the player in question and be done with it.
43
-
44
-
Make sure to save the structure with a structure void block inside, or the air might override whatever block the player is currently standing on.
0 commit comments