Give effects to entities if they are standing on a specific blockMaking entities invisible even in Spectator modeCan you use the /spreadplayers command with armor stands?Command blocks executing w/out required parameters metMinecraft : Testfor in 1.11 snapshots?Minecraft 1.12 - execute entity when clicked on while empty handedcommand block - "you must be a player to use this command!'Multiple target selectors in the same commandHow to test for a dropped item in minecraft? 1.13.1Can somebody help me with the execute commands in Minecraft?
Lípínguapua dopo Pêpê
Clarification on Integrability
Why did IBM make public the PC BIOS source code?
Why is the result of ('b'+'a'+ + 'a' + 'a').toLowerCase() 'banana'?
If I animate and control a zombie, does it benefit from Undead Fortitude when it's reduced to 0 HP?
How to remove ambiguity: "... lives in the city of H, the capital of the province of NS, WHERE the unemployment rate is ..."?
Do I have to cite common CS algorithms?
PhD advisor lost funding, need advice
Chunk + Enumerate a list of digits
Does fossil fuels use since 1990 account for half of all the fossil fuels used in history?
Escape Velocity - Won't the orbital path just become larger with higher initial velocity?
What is the status of this patent?
Why aren't rockets built with truss structures inside their fuel & oxidizer tanks to increase structural strength?
What is a good class if we remove subclasses?
Why is tert-butoxide often used in elimination reactions when it is not necessary?
How was the murder committed?
Weird resistor with dots around it
The cat ate your input again!
How can I see if the data in a SQL Server table is page-compressed?
How big are the Choedan Kal?
How to Check all AD userers for "blank" password?
Do Reform Jews believe in a theistic God?
Why is the Lucas test not recommended to differentiate higher alcohols?
How can I find an old paper when the usual methods fail?
Give effects to entities if they are standing on a specific block
Making entities invisible even in Spectator modeCan you use the /spreadplayers command with armor stands?Command blocks executing w/out required parameters metMinecraft : Testfor in 1.11 snapshots?Minecraft 1.12 - execute entity when clicked on while empty handedcommand block - "you must be a player to use this command!'Multiple target selectors in the same commandHow to test for a dropped item in minecraft? 1.13.1Can somebody help me with the execute commands in Minecraft?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I've been trying to give mobs effects if they stand on a specific block (for example, if a sheep stands on grass, it gets regeneration) using this command:
/execute @e[type=Sheep] ~ ~ ~ detect ~ ~ ~ grass 0 effect @e[type=Sheep] regeneration 1 0
However, it targets all sheep, even if only one fulfills the criteria.
minecraft minecraft-commands
add a comment |
I've been trying to give mobs effects if they stand on a specific block (for example, if a sheep stands on grass, it gets regeneration) using this command:
/execute @e[type=Sheep] ~ ~ ~ detect ~ ~ ~ grass 0 effect @e[type=Sheep] regeneration 1 0
However, it targets all sheep, even if only one fulfills the criteria.
minecraft minecraft-commands
add a comment |
I've been trying to give mobs effects if they stand on a specific block (for example, if a sheep stands on grass, it gets regeneration) using this command:
/execute @e[type=Sheep] ~ ~ ~ detect ~ ~ ~ grass 0 effect @e[type=Sheep] regeneration 1 0
However, it targets all sheep, even if only one fulfills the criteria.
minecraft minecraft-commands
I've been trying to give mobs effects if they stand on a specific block (for example, if a sheep stands on grass, it gets regeneration) using this command:
/execute @e[type=Sheep] ~ ~ ~ detect ~ ~ ~ grass 0 effect @e[type=Sheep] regeneration 1 0
However, it targets all sheep, even if only one fulfills the criteria.
minecraft minecraft-commands
minecraft minecraft-commands
edited 18 mins ago


pppery
1,5381 gold badge8 silver badges20 bronze badges
1,5381 gold badge8 silver badges20 bronze badges
asked Feb 29 '16 at 20:24
Seikatsu7Seikatsu7
187 bronze badges
187 bronze badges
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Use c=1
so that the sheep successfully detecting the grass will only target itself:
/execute @e[type=Sheep] ~ ~ ~ detect ~ ~-1 ~ grass 0 effect @e[type=Sheep,c=1] regeneration 1 0
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgaming.stackexchange.com%2fquestions%2f257142%2fgive-effects-to-entities-if-they-are-standing-on-a-specific-block%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
Use c=1
so that the sheep successfully detecting the grass will only target itself:
/execute @e[type=Sheep] ~ ~ ~ detect ~ ~-1 ~ grass 0 effect @e[type=Sheep,c=1] regeneration 1 0
add a comment |
Use c=1
so that the sheep successfully detecting the grass will only target itself:
/execute @e[type=Sheep] ~ ~ ~ detect ~ ~-1 ~ grass 0 effect @e[type=Sheep,c=1] regeneration 1 0
add a comment |
Use c=1
so that the sheep successfully detecting the grass will only target itself:
/execute @e[type=Sheep] ~ ~ ~ detect ~ ~-1 ~ grass 0 effect @e[type=Sheep,c=1] regeneration 1 0
Use c=1
so that the sheep successfully detecting the grass will only target itself:
/execute @e[type=Sheep] ~ ~ ~ detect ~ ~-1 ~ grass 0 effect @e[type=Sheep,c=1] regeneration 1 0
answered Feb 29 '16 at 21:01


SirBenetSirBenet
25.7k3 gold badges51 silver badges81 bronze badges
25.7k3 gold badges51 silver badges81 bronze badges
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgaming.stackexchange.com%2fquestions%2f257142%2fgive-effects-to-entities-if-they-are-standing-on-a-specific-block%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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