Well, for instance, if you wanted to wear a block on your head, you would type /replaceitem entity (your Minecraft username) slot.armor.head (block), and with a similar command you could replace slots in your inventory or ender chest with certain items. Tip: You can finish the command by just typing /replaceitem then hit tab a few times. Hit tab until you see the options you want.
You can use /clear to scan the person inventory for a certain item and remove it. The command block outputs a signal if successful, you could use this maybe? It would be no where near optimal though.
In one command block, that is always active and doesn't need redstone, have "/testfor @p {Inventory:[{id:"minecraft:sampleitem"}]}. Have a 2 comparators coming out from that, one with a 1 tick delay repeater. The one with no repeater put "/clear @p minecraft:sampleitem" and in the one with the repeater output put "/give @p minecraft:sampleitem2" and it should work. It's not 1 command block but at least it's not 140.
Hi!
How do I make it replace a spesific item to another?
Are you talking about the /replaceitem command?
>> Implying I have a signature
Yes!
I want something like this...
/replaceitem entity @p slot.hotbar.0 iron_sword>diamond_sword
Well, for instance, if you wanted to wear a block on your head, you would type /replaceitem entity (your Minecraft username) slot.armor.head (block), and with a similar command you could replace slots in your inventory or ender chest with certain items. Tip: You can finish the command by just typing /replaceitem then hit tab a few times. Hit tab until you see the options you want.
>> Implying I have a signature
yes but I want it to replace a spesific item... from (item) to (item)
Or is it any other command that would work?
I'm sure there's another way to have it do that, but I don't know what that would be. :I
>> Implying I have a signature
I know a way but for my use I would then need more then 140 commandblocks...
You can use /clear to scan the person inventory for a certain item and remove it. The command block outputs a signal if successful, you could use this maybe? It would be no where near optimal though.
I did know that way but it would for my use need more then 140 commandblocks...
so I want more advanced commands then 140 simple ones
In one command block, that is always active and doesn't need redstone, have "/testfor @p {Inventory:[{id:"minecraft:sampleitem"}]}. Have a 2 comparators coming out from that, one with a 1 tick delay repeater. The one with no repeater put "/clear @p minecraft:sampleitem" and in the one with the repeater output put "/give @p minecraft:sampleitem2" and it should work. It's not 1 command block but at least it's not 140.