How To Test For A Specific Dropped Item In Minecraft, How To Test For A Dropped Item In Minecraft

So I”m making a map with custom crafting and as far as I know it isn”t possible to give a custom name for something in custom crafting so if you can tell me how to do this that would be great, otherwise how do you test for an item in someone”s inventory with no name and then give them an item with a name. Then when they drop the item I want it to run setblock command. I am in 1.13 by the way.

Đang xem: How to test for a specific dropped item in minecraft

You”re right: 1.13 custom crafting doesn”t provide NBT tags for more customization (unfortunately).How to test for items, fun question! It”s actually not that much different from 1.12, well, “sorta” because as you probably know the /testfor command got shishkababed :DOn the good side though is that we got something much cooler in return!So to try and keep bias out of my comment (apologies for the sillyness: I”m a good mood right now ;)) I shall concentrate on a randomly chosen 1.13 item: the Turtle Shell Piece.Obviously Mojang did something wrong there because this should have been the “Shell shell” :DNow, the really cool part about 1.13 is that we can actually combine several command aspects into 1 command. So….give
p}> minecraft:turtle_shell_piece{display:{Name:”{“text”:”Shell shell”}”}}Dunno about you but this excites me. Unfortunately this isn”t good enough. See, the problem is that once you gave a renamed shell you cannot easily take back the vanilla one. I can specify what the id or Name should be, but cannot negate that.SO… Let”s apply a little more 1.13 awesomeness.Regular command block (but you”ll probably want to change this to a repeating one eventually):tag
p}> add hasshellSo now we marked the player who has a shell in his shell, errr: inventory :)Chain command block, always active but it doesn”t matter too much if you make this conditional or not (I suggest conditional):clear
p minecraft:turtle_shell_pieceSo now we took back the item, next stop: replacement.Chain command block as before (I suggest conditional):give

Read more: thinnest part of the hull wow

p minecraft:turtle_shell_piece{display:{Name:”{“text”:”Shell shell”}”}}This will give the replacement.Finally, another chain command block:tag
p remove hasshellAnd that will clear things up.So when they drop the item you want to run a setblock command. hmm..I may get back to you on that one. You”ll need an /execute command./execute as

Read more: How Many Quests Are In Wow Classic Crime And Punishment, Crime And Punishment

Leave a Comment