This tutorial is set by the author to use the CC By-NC-ND protocol.
You can refer to everyone who wants to use this module to make maps ~
Game version: 1.15.2 Module version 0.16.1-1.15.2
We use the/Data of the original MC to extract the data of the entity and block with a certain guidance symbol to help us quickly find the NBT tags of all items.
If you want to extract the NBT label of firearms, we get this order
As shown in the figure
/data get entity @S Inventory
We can optimize the extracted data into a pure NBT suitable for/give. If I want to get a mirror sniper as shown above, we can extract
/give @s cgm: heavy_rifle {ammocount: 4, attachments: {scope: {id: "cgm: long_scope", count: 1b}}}}}}
It can also be more streamlined:
/GIVE @P CGM: Heavy_rifle {Attachments: {scope: {ID: "cgm: long_scope", count: 1b}}}}
Then we can get it
Ammocount = ammunition number
Attachments = accessories
---- scope = sight
---- Barrel = muzzle
Color = color (the ghost knows what codes are, the original MC original dandelion yellow is 16701501)
In summary
If I want to get a pink, muffle, ammunition full of pistols with pistols with ammunition, USP | brain hole open
You can get the following command:
/give @p cgm: pistol {ammocount: 15, attachments: {scope: {ID: "cgm: long_scope", count: 1b}, barrel: {id: silencence ", count: 1b}, color: COLOR:15961002}
over