Anyone Have An Idea How To Make A Poison Sword In Minecraft, How To Make A Poison Sword In Minecraft

I”m not the most experienced person when it comes to commands. I worked out how to do stuff like when holding x you have y effect. I wanted to think of something that gave other people an effect when hit. Here is what I came up with but I got stuck when it said it couldn”t execute the command.

Đang xem: How to make a poison sword in minecraft

/scoreboard objective add nokill dummy/scoreboard objective add poi dummy/scoreboard players set nokill 1/scoreboard players add



You can use the stat.damageDealt and stat.damageTaken objective-types to target players who have dealt and taken damage for multiplayer support.

The following assumes you”re using the latest version, being 1.9.


Objective to track damage dealt.

/scoreboard objectives add Dealt stat.damageDealtObjective to track damage taken.

/scoreboard objectives add Taken stat.damageTakenItem to provide the player.

p minecraft:diamond_sword 1 0 {display:{Name:”Poison sword”}}Clock commands:

The following must be run in numerical order on a clock.

Remove the label from players who were wielding the particular item in the event they are no longer holding it.

Read more: Wow Holy Paladin Hidden Artifact Skin, Paladin Hidden Artifacts Appearances And Effects

/scoreboard players tag
a remove HoldingItemMark players who are wielding the desired item. Any tags that are not the root id, Damage, Count, and Slot will be placed within a single tag compound.

/scoreboard players tag
a add HoldingItem {SelectedItem:{id:”minecraft:diamond_sword”,tag:{display:{Name:”Poison sword”}}}}Cause players to are holding the sword and have dealt damage to inflict poison on the closest living player to them who has taken damage. Note, however, that targeting the actual player that was struck is impossible. There is nothing to state which player struck which player, short of guesswork via the auto-incrementing objectives. You may want to fiddle with the nested selector to fit your needs better.

p minecraft:poison 10 1Reset player”s “Dealt” and “Taken” scores for future detection.

/scoreboard players reset


Skylinerw has commented that this will bug on multiplayer. To fix this, just ad the team selector for each command and as long everyone has there own team, everything should be fine. You can always ally teams. For this example I am using team a called team. Also, instead of teams, you can use the tag where %% is the name.

Update: for a better reset machine, remove the torch and place a block in its spot than a repeater touching the comparator. Make sure to set the clock at its slowest speed (press 3 times) and is connected to the string of Redstone that connects to the final command block.

I have a different method to this. (This is an edit of Dragnoz”s video”s method)/

The first command block tests for an item. In this case, I used dragnoz”s command:

p {SelectedItemSlot:0,Inventory:<{Slot:0b,tag:{display:{Name:"Poisoned Blade"}}}>}/testfor
e 2 13 2 This is the effect command. You can customize it, but here I gave made it so that when I use the Poisoned Blade, all entities in a range of 16 except for players get effect 2 (slowness) for 13 seconds which is level 2.


The first three blocks to the left reset the comparators to off.Then we have a clock running these commands 24/7Then we have 1CB, followed by a comparator, 2CB followed by a comparator, 3CB, followed by a comparator.Then at the end of the comparator we have a redstone string that inputs a signal to a redstone torch.The redstone torch is connected to a wire of redstone which goes to a command block that resets the scoreboard (/scoreboard players set
p damage 0) so the command can operator more than one time.

You can do all sorts of stuff with the execute command, one of my favorite being that you when you replace the effect slowness with heal.

In a nutshell it tests if you are holding (in slot 0) A sword named Poisoned blade > then it tests if you have done damage > finally it executes a command (effect) and then resets the score for further use.

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.

Read more: wow death of a tidesage

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

Post Your Answer Discard

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged minecraft-java-edition minecraft-commands or ask your own question.



site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. rev2021.3.23.38880

Leave a Comment