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?

CiviEvent: Public link for events of a specific type

What does "sndry explns" mean in one of the Hitchhiker's guide books?

Why is Grand Jury testimony secret?

When to use the root test. Is this not a good situation to use it?

What does "rabbited" mean/imply in this sentence?

In microwave frequencies, do you use a circulator when you need a (near) perfect diode?

How to reverse every other sublist of a list?

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

Realistic Alternatives to Dust: What Else Could Feed a Plankton Bloom?

The difference between dialogue marks

Is domain driven design an anti-SQL pattern?

I see my dog run

If the Wish spell is used to duplicate the effect of Simulacrum, are existing duplicates destroyed?

Idiomatic way to prevent slicing?

What is the motivation for a law requiring 2 parties to consent for recording a conversation

Could a US political party gain complete control over the government by removing checks & balances?

How is radar separation assured between primary and secondary targets?

How to deal with fear of taking dependencies

Output the Arecibo Message

Protecting Dualbooting Windows from dangerous code (like rm -rf)

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

I looked up a future colleague on LinkedIn before I started a job. I told my colleague about it and he seemed surprised. Should I apologize?

Pristine Bit Checking

Why do UK politicians seemingly ignore opinion polls on Brexit?



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 46 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 46 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 46 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 46 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

Isurus Índice Especies | Notas | Véxase tamén | Menú de navegación"A compendium of fossil marine animal genera (Chondrichthyes entry)"o orixinal"A review of the Tertiary fossil Cetacea (Mammalia) localities in wales port taf Museum Victoria"o orixinalThe Vertebrate Fauna of the Selma Formation of Alabama. Part VII. Part VIII. The Mosasaurs The Fishes50419737IDsh85068767Isurus2548834613242066569678159923NHMSYS00210535017845105743

Король Коль Исторические данные | Стихотворение | Примечания | Навигацияверсии1 правкаверсии1 правкаA New interpretation of the 'Artognou' stone, TintagelTintagel IslandАрхивировано

Roughly how much would it cost to hire a team of dwarves to build a home in the mountainside? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)How much does a house cost?How long does it take to mine rock?How much does a house cost?How much gold would the construction of a forge cost?How much does a door cost?How much would it cost to make this magic item?How much would a glue bomb cost?How much does mandrake root cost?How much does a slave cost?How much does equipment cost?How much do sheep cost?How much would firearms cost?