/give @p minecraft:shulker_box{BlockEntityTag:{Items:[{Slot:0b,id:"minecraft:iron_sword",Count:1b},{Slot:1b,id:"minecraft:iron_pickaxe",Count:1b},{Slot:2b,id:"minecraft:iron_axe",Count:1b},{Slot:3b,id:"minecraft:iron_shovel",Count:1b},{Slot:4b,id:"minecraft:iron_hoe",Count:1b},{Slot:5b,id:"minecraft:cooked_beef",Count:64b},{Slot:6b,id:"minecraft:golden_apple",Count:5b},{Slot:7b,id:"minecraft:iron_helmet",Count:1b},{Slot:8b,id:"minecraft:iron_chestplate",Count:1b},{Slot:9b,id:"minecraft:iron_leggings",Count:1b},{Slot:10b,id:"minecraft:iron_boots",Count:1b},{Slot:11b,id:"minecraft:torch",Count:64b},{Slot:12b,id:"minecraft:bow",Count:1b},{Slot:13b,id:"minecraft:arrow",Count:64b}]}} 1
You can customize the items, quantities, and slots as you see fit for the kit you want to provide. Each item is contained within curly braces ({}) with its slot number, ID, and count. The slot numbers determine where in the shulker box the items will appear, ranging from 0 to 26.
To use this command in the game, you'd either type it into the chat window or use a command block. Keep in mind that you need to have the necessary permissions to run this command, which typically means you need to be in creative mode or have operator (cheat) permissions on the server.
In Minecraft Java Edition, you cannot give players spawn eggs that directly spawn a block; however, it is possible to give a player a spawn egg that spawns a mob equipped with the ability to run a command upon arrival. Typical spawn eggs do not inherently run commands or perform actions other than spawning their respective entities.
For this task, we would need to use command blocks or functions to simulate the desired result instead. Here's a more advanced approach that involves summoning a mob that triggers a command block to place a beacon at its location when it spawns:
- First, place a command block (you can get one with
/give @p command_block) and set it to "Repeat" and "Always Active."
- In the command block, enter the command to detect a specific entity and summon a beacon at its location. For example, if we were using a tagged armor stand for this purpose:
/execute at @e[type=minecraft:armor_stand,tag=spawnBeacon] run setblock ~ ~ ~ minecraft:beacon
- Then you need to summon the armor stand with the correct tags:
/summon minecraft:armor_stand ~ ~ ~ {Tags:["spawnBeacon"]}
When this armor stand is summoned, it will trigger the command block to place a beacon at its location, essentially acting as your "spawn egg."
If you want to give this functionality to a player, you could employ a spawn egg to summon the armor stand that has the tag recognized by the command block:
- Using a command to give a zombie spawn egg with custom NBT to summon an armor stand:
/give @p minecraft:zombie_spawn_egg{EntityTag:{id:"minecraft:armor_stand",Tags:["spawnBeacon"]}} 1
-
When a player uses this spawn egg, it spawns a zombie that gets replaced by the custom armor stand immediately because the spawn egg carries the data to summon an armor stand with the "spawnBeacon" tag instead.
-
The "Repeat" command block that's already set up and running will detect the newly spawned armor stand with the "spawnBeacon" tag and will execute the command to set a beacon at its location.
Remember, this will only work correctly if the command block is set up to repeatedly check for the armor stand and if the command block is within the loaded chunks and can affect the location of the spawned entity.
This approach is quite complex and a bit roundabout, as Minecraft does not support giving a player an item that can directly place a block via spawn eggs without involving entities. Please note that such setups should be handled with care, as they may potentially be misused or impact server performance if done improperly.