Skip to content

Commit 1801d86

Browse files
committed
updated give item bedrock to include loot table method
1 parent 16eceff commit 1801d86

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

questions/giveitembedrock.md

+20-10
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,25 @@ Using `/give` on bedrock only works for "basic" items, without any alterations l
77
> [!NOTE]
88
> 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.
99
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+
1129

1230
### Physical chest
1331

@@ -27,18 +45,10 @@ Step 6: Has the advantage that you don't need to fiddle with the language files
2745

2846
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:
2947

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).
3149
2. change the structure block to load mode
3250
3. whenever you need it, setblock a redstone block next to the structure block (and remove it again a tick later)
3351
4. teleport the item entities to the player
3452

3553
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.
3654
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

Comments
 (0)