how to make an item unbreakable when appearing in inventory The 2019 Stack Overflow Developer Survey Results Are InMinecraft problem with commands - /testfor healthHow to change scoreboard score if player does not have item in his inventory?how to make setblock a command block with a command that is executed at a certain playerHow to use exclamation marks in Minecraft commands?How to make a fireball summoning item in vanilla Minecraft?testfor a cocoa bean in a player inventoryHow do I make command blocks teleport players away from an area when they don't have a specific item?How do I make a block only be placed on a certain block when crafted?Minecraft 1.13: conditionally apply effect when player holds specific itemHow can I make a killcounter?

Is there a name of the flying bionic bird?

I see my dog run

What does Linus Torvalds mean when he says that Git "never ever" tracks a file?

Can the Protection from Evil and Good spell be used on the caster?

Limit the amount of RAM Mathematica may access?

Access elements in std::string where positon of string is greater than its size

A poker game description that does not feel gimmicky

How do you say "canon" as in "official for a story universe"?

Why don't Unix/Linux systems traverse through directories until they find the required version of a linked library?

Flying Bloodthirsty Lampshades

The difference between dialogue marks

Is an up-to-date browser secure on an out-of-date OS?

Dual Citizen. Exited the US on Italian passport recently

Why is Grand Jury testimony secret?

What is the use of option -o in the useradd command?

Which Sci-Fi work first showed weapon of galactic-scale mass destruction?

Inflated grade on resume at previous job, might former employer tell new employer?

Is flight data recorder erased after every flight?

What is the best strategy for white in this position?

What spell level should this homebrew After-Image spell be?

How come people say “Would of”?

Inversion Puzzle

Falsification in Math vs Science

Are there any other methods to apply to solving simultaneous equations?



how to make an item unbreakable when appearing in inventory



The 2019 Stack Overflow Developer Survey Results Are InMinecraft problem with commands - /testfor healthHow to change scoreboard score if player does not have item in his inventory?how to make setblock a command block with a command that is executed at a certain playerHow to use exclamation marks in Minecraft commands?How to make a fireball summoning item in vanilla Minecraft?testfor a cocoa bean in a player inventoryHow do I make command blocks teleport players away from an area when they don't have a specific item?How do I make a block only be placed on a certain block when crafted?Minecraft 1.13: conditionally apply effect when player holds specific itemHow can I make a killcounter?



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















i already know how to make items in minecraft unbreakable (using the give command), but how would you make so when a player crafts or picks up a tool the command blocks would make it unbreakable? when i used this command, (without the quotation marks)
"/entitydata @a diamond_sword Unbreakable:1",
the output is:
awesomeianman is a player and cannot be changed.
could someone tell me if i suck at commands and got it all wrong, or i just got some of it wrong.










share|improve this question














bumped to the homepage by Community 45 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • so would i need to delete the diamond_sword then change @a to diamond_sword?

    – burger king
    May 7 '17 at 22:44











  • Sorry about what i said earlier after looking at it there is a completely different problem you have yes you can't make a player unbreakable but also you can't use entity data at all for diamond sword because it isn't an entity. Here is a list of all entitys: digminecraft.com/lists/entity_list_pc.php

    – Emptyisme
    May 8 '17 at 3:03











  • are you trying to see if a player crafts a certain item then replace it with an unbreakable version?

    – Jake
    May 8 '17 at 20:50











  • @BACONISDABEST2COOL4U just to clarify, are you trying to do this for a specific tool or all tools?

    – Jake
    May 9 '17 at 17:03












  • yes, I do want to make when a player crafts a diamond_sword then gets replaced with an unbreakable version and I need it to make it happen with all tools.

    – burger king
    May 31 '17 at 1:16

















0















i already know how to make items in minecraft unbreakable (using the give command), but how would you make so when a player crafts or picks up a tool the command blocks would make it unbreakable? when i used this command, (without the quotation marks)
"/entitydata @a diamond_sword Unbreakable:1",
the output is:
awesomeianman is a player and cannot be changed.
could someone tell me if i suck at commands and got it all wrong, or i just got some of it wrong.










share|improve this question














bumped to the homepage by Community 45 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • so would i need to delete the diamond_sword then change @a to diamond_sword?

    – burger king
    May 7 '17 at 22:44











  • Sorry about what i said earlier after looking at it there is a completely different problem you have yes you can't make a player unbreakable but also you can't use entity data at all for diamond sword because it isn't an entity. Here is a list of all entitys: digminecraft.com/lists/entity_list_pc.php

    – Emptyisme
    May 8 '17 at 3:03











  • are you trying to see if a player crafts a certain item then replace it with an unbreakable version?

    – Jake
    May 8 '17 at 20:50











  • @BACONISDABEST2COOL4U just to clarify, are you trying to do this for a specific tool or all tools?

    – Jake
    May 9 '17 at 17:03












  • yes, I do want to make when a player crafts a diamond_sword then gets replaced with an unbreakable version and I need it to make it happen with all tools.

    – burger king
    May 31 '17 at 1:16













0












0








0


0






i already know how to make items in minecraft unbreakable (using the give command), but how would you make so when a player crafts or picks up a tool the command blocks would make it unbreakable? when i used this command, (without the quotation marks)
"/entitydata @a diamond_sword Unbreakable:1",
the output is:
awesomeianman is a player and cannot be changed.
could someone tell me if i suck at commands and got it all wrong, or i just got some of it wrong.










share|improve this question














i already know how to make items in minecraft unbreakable (using the give command), but how would you make so when a player crafts or picks up a tool the command blocks would make it unbreakable? when i used this command, (without the quotation marks)
"/entitydata @a diamond_sword Unbreakable:1",
the output is:
awesomeianman is a player and cannot be changed.
could someone tell me if i suck at commands and got it all wrong, or i just got some of it wrong.







minecraft minecraft-commands






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked May 7 '17 at 18:14









burger kingburger king

96




96





bumped to the homepage by Community 45 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 45 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.














  • so would i need to delete the diamond_sword then change @a to diamond_sword?

    – burger king
    May 7 '17 at 22:44











  • Sorry about what i said earlier after looking at it there is a completely different problem you have yes you can't make a player unbreakable but also you can't use entity data at all for diamond sword because it isn't an entity. Here is a list of all entitys: digminecraft.com/lists/entity_list_pc.php

    – Emptyisme
    May 8 '17 at 3:03











  • are you trying to see if a player crafts a certain item then replace it with an unbreakable version?

    – Jake
    May 8 '17 at 20:50











  • @BACONISDABEST2COOL4U just to clarify, are you trying to do this for a specific tool or all tools?

    – Jake
    May 9 '17 at 17:03












  • yes, I do want to make when a player crafts a diamond_sword then gets replaced with an unbreakable version and I need it to make it happen with all tools.

    – burger king
    May 31 '17 at 1:16

















  • so would i need to delete the diamond_sword then change @a to diamond_sword?

    – burger king
    May 7 '17 at 22:44











  • Sorry about what i said earlier after looking at it there is a completely different problem you have yes you can't make a player unbreakable but also you can't use entity data at all for diamond sword because it isn't an entity. Here is a list of all entitys: digminecraft.com/lists/entity_list_pc.php

    – Emptyisme
    May 8 '17 at 3:03











  • are you trying to see if a player crafts a certain item then replace it with an unbreakable version?

    – Jake
    May 8 '17 at 20:50











  • @BACONISDABEST2COOL4U just to clarify, are you trying to do this for a specific tool or all tools?

    – Jake
    May 9 '17 at 17:03












  • yes, I do want to make when a player crafts a diamond_sword then gets replaced with an unbreakable version and I need it to make it happen with all tools.

    – burger king
    May 31 '17 at 1:16
















so would i need to delete the diamond_sword then change @a to diamond_sword?

– burger king
May 7 '17 at 22:44





so would i need to delete the diamond_sword then change @a to diamond_sword?

– burger king
May 7 '17 at 22:44













Sorry about what i said earlier after looking at it there is a completely different problem you have yes you can't make a player unbreakable but also you can't use entity data at all for diamond sword because it isn't an entity. Here is a list of all entitys: digminecraft.com/lists/entity_list_pc.php

– Emptyisme
May 8 '17 at 3:03





Sorry about what i said earlier after looking at it there is a completely different problem you have yes you can't make a player unbreakable but also you can't use entity data at all for diamond sword because it isn't an entity. Here is a list of all entitys: digminecraft.com/lists/entity_list_pc.php

– Emptyisme
May 8 '17 at 3:03













are you trying to see if a player crafts a certain item then replace it with an unbreakable version?

– Jake
May 8 '17 at 20:50





are you trying to see if a player crafts a certain item then replace it with an unbreakable version?

– Jake
May 8 '17 at 20:50













@BACONISDABEST2COOL4U just to clarify, are you trying to do this for a specific tool or all tools?

– Jake
May 9 '17 at 17:03






@BACONISDABEST2COOL4U just to clarify, are you trying to do this for a specific tool or all tools?

– Jake
May 9 '17 at 17:03














yes, I do want to make when a player crafts a diamond_sword then gets replaced with an unbreakable version and I need it to make it happen with all tools.

– burger king
May 31 '17 at 1:16





yes, I do want to make when a player crafts a diamond_sword then gets replaced with an unbreakable version and I need it to make it happen with all tools.

– burger king
May 31 '17 at 1:16










1 Answer
1






active

oldest

votes


















0














To do this you would need a few command blocks for each item you want to make unbreakable. To identify the player who has the item in their inventory we are going to use scoreboards. In this example we will use a diamond sword but you can change wherever it syas diamond sword to whatever item you would like.



Setup



run this once:



/scoreboard objectives add hasItem stat.craftItem.minecraft.diamond_sword


Detection



put this in a repeating command block:



/testfor @a[score_hasItem_min=1]


Execution



Using a comparator, run these commands when a player is found:



/clear @a[score_hasItem_min=1] minecraft:diamond_sword 0
/give @a[score_hasItem_min=1] minecraft:diamond_sword 1 1 Unbreakable:1b
/scoreboard players reset @a hasItem


Layout



Here is my layout:
layout
Where the commands are from 1 - 4:



/testfor @a[score_hasItem_min=1]
/clear @a[score_hasItem_min=1] minecraft:diamond_sword 0
/give @a[score_hasItem_min=1] minecraft:diamond_sword 1 1 Unbreakable:1b
/scoreboard players reset @a hasItem





share|improve this answer























  • he is trying to add unbreakable to every tool the person crafts not specific tools he gives, what he wants is when somebody makes a wooden hoe he want it to be unbreakable. He wants every tool crafted to be unbreakable. Although your fix would work it would take a lot of scoreboard stats and a lot of command blocks and basically isn't worth the time.

    – Emptyisme
    May 8 '17 at 23:24












  • @Empytyisme I see, this would definitely not be effective for replacing every tool. I misunderstood what the OP was asking.

    – Jake
    May 9 '17 at 6:35











  • actually I just needed example with a diamond_sword so I could do it with all other tools

    – burger king
    May 31 '17 at 1:17











  • but i'm fine doing this strategy over and over again

    – burger king
    May 31 '17 at 1:18











  • @BACONISDABEST2COOL4U that's great, so is this an acceptable answer?

    – Jake
    May 31 '17 at 1:19











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "41"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgaming.stackexchange.com%2fquestions%2f308548%2fhow-to-make-an-item-unbreakable-when-appearing-in-inventory%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














To do this you would need a few command blocks for each item you want to make unbreakable. To identify the player who has the item in their inventory we are going to use scoreboards. In this example we will use a diamond sword but you can change wherever it syas diamond sword to whatever item you would like.



Setup



run this once:



/scoreboard objectives add hasItem stat.craftItem.minecraft.diamond_sword


Detection



put this in a repeating command block:



/testfor @a[score_hasItem_min=1]


Execution



Using a comparator, run these commands when a player is found:



/clear @a[score_hasItem_min=1] minecraft:diamond_sword 0
/give @a[score_hasItem_min=1] minecraft:diamond_sword 1 1 Unbreakable:1b
/scoreboard players reset @a hasItem


Layout



Here is my layout:
layout
Where the commands are from 1 - 4:



/testfor @a[score_hasItem_min=1]
/clear @a[score_hasItem_min=1] minecraft:diamond_sword 0
/give @a[score_hasItem_min=1] minecraft:diamond_sword 1 1 Unbreakable:1b
/scoreboard players reset @a hasItem





share|improve this answer























  • he is trying to add unbreakable to every tool the person crafts not specific tools he gives, what he wants is when somebody makes a wooden hoe he want it to be unbreakable. He wants every tool crafted to be unbreakable. Although your fix would work it would take a lot of scoreboard stats and a lot of command blocks and basically isn't worth the time.

    – Emptyisme
    May 8 '17 at 23:24












  • @Empytyisme I see, this would definitely not be effective for replacing every tool. I misunderstood what the OP was asking.

    – Jake
    May 9 '17 at 6:35











  • actually I just needed example with a diamond_sword so I could do it with all other tools

    – burger king
    May 31 '17 at 1:17











  • but i'm fine doing this strategy over and over again

    – burger king
    May 31 '17 at 1:18











  • @BACONISDABEST2COOL4U that's great, so is this an acceptable answer?

    – Jake
    May 31 '17 at 1:19















0














To do this you would need a few command blocks for each item you want to make unbreakable. To identify the player who has the item in their inventory we are going to use scoreboards. In this example we will use a diamond sword but you can change wherever it syas diamond sword to whatever item you would like.



Setup



run this once:



/scoreboard objectives add hasItem stat.craftItem.minecraft.diamond_sword


Detection



put this in a repeating command block:



/testfor @a[score_hasItem_min=1]


Execution



Using a comparator, run these commands when a player is found:



/clear @a[score_hasItem_min=1] minecraft:diamond_sword 0
/give @a[score_hasItem_min=1] minecraft:diamond_sword 1 1 Unbreakable:1b
/scoreboard players reset @a hasItem


Layout



Here is my layout:
layout
Where the commands are from 1 - 4:



/testfor @a[score_hasItem_min=1]
/clear @a[score_hasItem_min=1] minecraft:diamond_sword 0
/give @a[score_hasItem_min=1] minecraft:diamond_sword 1 1 Unbreakable:1b
/scoreboard players reset @a hasItem





share|improve this answer























  • he is trying to add unbreakable to every tool the person crafts not specific tools he gives, what he wants is when somebody makes a wooden hoe he want it to be unbreakable. He wants every tool crafted to be unbreakable. Although your fix would work it would take a lot of scoreboard stats and a lot of command blocks and basically isn't worth the time.

    – Emptyisme
    May 8 '17 at 23:24












  • @Empytyisme I see, this would definitely not be effective for replacing every tool. I misunderstood what the OP was asking.

    – Jake
    May 9 '17 at 6:35











  • actually I just needed example with a diamond_sword so I could do it with all other tools

    – burger king
    May 31 '17 at 1:17











  • but i'm fine doing this strategy over and over again

    – burger king
    May 31 '17 at 1:18











  • @BACONISDABEST2COOL4U that's great, so is this an acceptable answer?

    – Jake
    May 31 '17 at 1:19













0












0








0







To do this you would need a few command blocks for each item you want to make unbreakable. To identify the player who has the item in their inventory we are going to use scoreboards. In this example we will use a diamond sword but you can change wherever it syas diamond sword to whatever item you would like.



Setup



run this once:



/scoreboard objectives add hasItem stat.craftItem.minecraft.diamond_sword


Detection



put this in a repeating command block:



/testfor @a[score_hasItem_min=1]


Execution



Using a comparator, run these commands when a player is found:



/clear @a[score_hasItem_min=1] minecraft:diamond_sword 0
/give @a[score_hasItem_min=1] minecraft:diamond_sword 1 1 Unbreakable:1b
/scoreboard players reset @a hasItem


Layout



Here is my layout:
layout
Where the commands are from 1 - 4:



/testfor @a[score_hasItem_min=1]
/clear @a[score_hasItem_min=1] minecraft:diamond_sword 0
/give @a[score_hasItem_min=1] minecraft:diamond_sword 1 1 Unbreakable:1b
/scoreboard players reset @a hasItem





share|improve this answer













To do this you would need a few command blocks for each item you want to make unbreakable. To identify the player who has the item in their inventory we are going to use scoreboards. In this example we will use a diamond sword but you can change wherever it syas diamond sword to whatever item you would like.



Setup



run this once:



/scoreboard objectives add hasItem stat.craftItem.minecraft.diamond_sword


Detection



put this in a repeating command block:



/testfor @a[score_hasItem_min=1]


Execution



Using a comparator, run these commands when a player is found:



/clear @a[score_hasItem_min=1] minecraft:diamond_sword 0
/give @a[score_hasItem_min=1] minecraft:diamond_sword 1 1 Unbreakable:1b
/scoreboard players reset @a hasItem


Layout



Here is my layout:
layout
Where the commands are from 1 - 4:



/testfor @a[score_hasItem_min=1]
/clear @a[score_hasItem_min=1] minecraft:diamond_sword 0
/give @a[score_hasItem_min=1] minecraft:diamond_sword 1 1 Unbreakable:1b
/scoreboard players reset @a hasItem






share|improve this answer












share|improve this answer



share|improve this answer










answered May 8 '17 at 21:31









JakeJake

239211




239211












  • he is trying to add unbreakable to every tool the person crafts not specific tools he gives, what he wants is when somebody makes a wooden hoe he want it to be unbreakable. He wants every tool crafted to be unbreakable. Although your fix would work it would take a lot of scoreboard stats and a lot of command blocks and basically isn't worth the time.

    – Emptyisme
    May 8 '17 at 23:24












  • @Empytyisme I see, this would definitely not be effective for replacing every tool. I misunderstood what the OP was asking.

    – Jake
    May 9 '17 at 6:35











  • actually I just needed example with a diamond_sword so I could do it with all other tools

    – burger king
    May 31 '17 at 1:17











  • but i'm fine doing this strategy over and over again

    – burger king
    May 31 '17 at 1:18











  • @BACONISDABEST2COOL4U that's great, so is this an acceptable answer?

    – Jake
    May 31 '17 at 1:19

















  • he is trying to add unbreakable to every tool the person crafts not specific tools he gives, what he wants is when somebody makes a wooden hoe he want it to be unbreakable. He wants every tool crafted to be unbreakable. Although your fix would work it would take a lot of scoreboard stats and a lot of command blocks and basically isn't worth the time.

    – Emptyisme
    May 8 '17 at 23:24












  • @Empytyisme I see, this would definitely not be effective for replacing every tool. I misunderstood what the OP was asking.

    – Jake
    May 9 '17 at 6:35











  • actually I just needed example with a diamond_sword so I could do it with all other tools

    – burger king
    May 31 '17 at 1:17











  • but i'm fine doing this strategy over and over again

    – burger king
    May 31 '17 at 1:18











  • @BACONISDABEST2COOL4U that's great, so is this an acceptable answer?

    – Jake
    May 31 '17 at 1:19
















he is trying to add unbreakable to every tool the person crafts not specific tools he gives, what he wants is when somebody makes a wooden hoe he want it to be unbreakable. He wants every tool crafted to be unbreakable. Although your fix would work it would take a lot of scoreboard stats and a lot of command blocks and basically isn't worth the time.

– Emptyisme
May 8 '17 at 23:24






he is trying to add unbreakable to every tool the person crafts not specific tools he gives, what he wants is when somebody makes a wooden hoe he want it to be unbreakable. He wants every tool crafted to be unbreakable. Although your fix would work it would take a lot of scoreboard stats and a lot of command blocks and basically isn't worth the time.

– Emptyisme
May 8 '17 at 23:24














@Empytyisme I see, this would definitely not be effective for replacing every tool. I misunderstood what the OP was asking.

– Jake
May 9 '17 at 6:35





@Empytyisme I see, this would definitely not be effective for replacing every tool. I misunderstood what the OP was asking.

– Jake
May 9 '17 at 6:35













actually I just needed example with a diamond_sword so I could do it with all other tools

– burger king
May 31 '17 at 1:17





actually I just needed example with a diamond_sword so I could do it with all other tools

– burger king
May 31 '17 at 1:17













but i'm fine doing this strategy over and over again

– burger king
May 31 '17 at 1:18





but i'm fine doing this strategy over and over again

– burger king
May 31 '17 at 1:18













@BACONISDABEST2COOL4U that's great, so is this an acceptable answer?

– Jake
May 31 '17 at 1:19





@BACONISDABEST2COOL4U that's great, so is this an acceptable answer?

– Jake
May 31 '17 at 1:19

















draft saved

draft discarded
















































Thanks for contributing an answer to Arqade!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgaming.stackexchange.com%2fquestions%2f308548%2fhow-to-make-an-item-unbreakable-when-appearing-in-inventory%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

ParseJSON using SSJSUsing AMPscript with SSJS ActivitiesHow to resubscribe a user in Marketing cloud using SSJS?Pulling Subscriber Status from Lists using SSJSRetrieving Emails using SSJSProblem in updating DE using SSJSUsing SSJS to send single email in Marketing CloudError adding EmailSendDefinition using SSJS

Кампала Садржај Географија Географија Историја Становништво Привреда Партнерски градови Референце Спољашње везе Мени за навигацију0°11′ СГШ; 32°20′ ИГД / 0.18° СГШ; 32.34° ИГД / 0.18; 32.340°11′ СГШ; 32°20′ ИГД / 0.18° СГШ; 32.34° ИГД / 0.18; 32.34МедијиПодациЗванични веб-сајту

19. јануар Садржај Догађаји Рођења Смрти Празници и дани сећања Види још Референце Мени за навигацијуу