1
I have been busy playing mods and watching CaptainSparklez's videos on youtube. I have Completely forgot about my ongoing games.
I have decided to expand my knowledge about some commands that I really don't know how to use, but I understand how it works so that's one problem out of the bag.
first, the /execute.
on my map Ender Games the upcoming gamemode: Coliseum is a bit of a problem since the starting and respawning area for both teams are accessible to both teams. I have been using this command
the problem though, while this works perfectly, it just TPs the WRONG person everytime! (I understand this because of the @p in
another problem is that sometimes, it just says "cannot execute detect on Dudamesh" and once this happens, it will permanently do this.
the other thing is how to kill enderpearls that pass through 5 blocks of an iron block. (Iron block as the floor. then if you throw an enderpearl, if it goes 5 blocks UP the iron block it kills it, however if it doesn't (go 5 blocks or more) it won't kill the ender pearl)
the next thing: the /clone
I got an Idea while trying to sleep, "what if I made trapped chests into ender chests"
now I figured using the /clone would help if I hook it to the trapped chest then clone the trapped chest to another trapped chest. however this plan is I think correct, BUT it doesn't clone it at the right time. the thing was if i put a diamond on the chest, this will clone the chest and the other chest gets a diamond. I figured maybe using a NOT gate (Inverter) on this one to solve it?
the last thing, the /testfor.
how does this command really work? what is the second arguement mean? (arguements: /testfor <player> <data tag>)
I think that's about it, I really need to find an answer to this one and fast.
I have decided to expand my knowledge about some commands that I really don't know how to use, but I understand how it works so that's one problem out of the bag.
first, the /execute.
on my map Ender Games the upcoming gamemode: Coliseum is a bit of a problem since the starting and respawning area for both teams are accessible to both teams. I have been using this command
/execute @a ~ ~ ~ detect ~ ~-1 ~ minecraft:iron_block 0 /tp @p[team=Orange] ~-5 ~ ~5 to tp Orange team players 5 blocks back diagonally the problem though, while this works perfectly, it just TPs the WRONG person everytime! (I understand this because of the @p in
minecraft:iron_block 0 /tp @p[team=Orange] ~-5 ~ ~5) Is there anyway to somehow change where the commandblock is trying to find who is the nearest player ( I understand moving the commandblock is the solution to this but I need to do this to expand my knowledge, if it is really impossible, I'll use that then.)another problem is that sometimes, it just says "cannot execute detect on Dudamesh" and once this happens, it will permanently do this.
the other thing is how to kill enderpearls that pass through 5 blocks of an iron block. (Iron block as the floor. then if you throw an enderpearl, if it goes 5 blocks UP the iron block it kills it, however if it doesn't (go 5 blocks or more) it won't kill the ender pearl)
the next thing: the /clone
I got an Idea while trying to sleep, "what if I made trapped chests into ender chests"
now I figured using the /clone would help if I hook it to the trapped chest then clone the trapped chest to another trapped chest. however this plan is I think correct, BUT it doesn't clone it at the right time. the thing was if i put a diamond on the chest, this will clone the chest and the other chest gets a diamond. I figured maybe using a NOT gate (Inverter) on this one to solve it?
the last thing, the /testfor.
how does this command really work? what is the second arguement mean? (arguements: /testfor <player> <data tag>)
I think that's about it, I really need to find an answer to this one and fast.
7
Dudamesh@Jmal116
Your command:Jmal116didn't quite work, I'm guessing the Enderpearl was too fast to get executed but the experiments I did showed instantaneous detection, I don't know what's the problem but I still need a command that kills enderpearls passing through up to 1-5 blocks.execute @e[type=ThrownEnderpearl] ~ ~ ~ detect ~ ~-5 ~ iron_block -1 kill @e[c=1]
as I was writing this, I figured maybe placing multiple execute commands for the 1-5 blocks. I'll test if this works.
nvrmind. I found out that it was only detecting enderpearls EXACTLY 5 blocks up. I think I overcomplicated it, but I just put 5 command blocks in a fill clock with 1-5 blocks above the block.
@Jmal116
Your command:
as I was writing this, I figured maybe placing multiple execute commands for the 1-5 blocks. I'll test if this works.
Your command:
Jmal116 execute @e[type=ThrownEnderpearl] ~ ~ ~ detect ~ ~-5 ~ iron_block -1 kill @e[c=1] didn't quite work, I'm guessing the Enderpearl was too fast to get executed but the experiments I did showed instantaneous detection, I don't know what's the problem but I still need a command that kills enderpearls passing through up to 1-5 blocks.as I was writing this, I figured maybe placing multiple execute commands for the 1-5 blocks. I'll test if this works.
Zoyaroxthe other thing is how to kill enderpearls that pass through 5 blocks of an iron block. (Iron block as the floor. then if you throw an enderpearl, if it goes 5 blocks UP the iron block it kills it, however if it doesn't (go 5 blocks or more) it won't kill the ender pearl)
For that a better solution may be the following:
1. Create a scoreboard objective.
2./scoreboard players add @e[type=ThrownEnderpearl] OBJECTIVE 1
3. You set your Objective to the sidebar and look to what it counted when the enderpearl flew 5 blocks.
4./kill @e[score_OBJECTIVE_min=>measured amount<]
Then the enderpearl will get killed when it flew 5 blocks.
This will probably be a better solution for your game
Hope I helped
this wasn't what I was looking for, but this CAN help my new class. in Endergames of course.
Dudamesh... btw what is the [c=1] on the enderpearl? ...
... I don't really get what the xyz on the player arguement ...
The c=1 sets a max entity count of one. In this case, it's telling it to only kill one entity. It will always be the closest entity (similar to @p). Since you're executing from an ender pearl, it is essentially just saying to only kill that specific ender pearl.
The xyzr thing defines coordinates for the command to look in, without having to physically move the command block (the r is a search radius). For instance, if you were to type this:
tp @a[5,5,5,2] 10 10 10It would teleport all players within 2 blocks of 5,5,5 to the coordinates 10,10,10, no matter where in the world you put the command block.the other thing is how to kill enderpearls that pass through 5 blocks of an iron block. (Iron block as the floor. then if you throw an enderpearl, if it goes 5 blocks UP the iron block it kills it, however if it doesn't (go 5 blocks or more) it won't kill the ender pearl)
For that a better solution may be the following:
1. Create a scoreboard objective.
2.
/scoreboard players add @e[type=ThrownEnderpearl] OBJECTIVE 13. You set your Objective to the sidebar and look to what it counted when the enderpearl flew 5 blocks.
4.
/kill @e[score_OBJECTIVE_min=>measured amount<]Then the enderpearl will get killed when it flew 5 blocks.
This will probably be a better solution for your game
Hope I helped
that pretty much solves everything.
I figured out the thing on clone, I just really needed to put a NOT gate.
this was just cloning the chest AFTER it closes.
btw what is the [c=1] on the enderpearl?
the testfor thing is just really basic I know, what I was looking for are some NBT data tags
I don't really get what the xyz on the player arguement
or what it really does.
anyways. thanks for the things on /execute, very helpful btw!
I figured out the thing on clone, I just really needed to put a NOT gate.
this was just cloning the chest AFTER it closes.
btw what is the [c=1] on the enderpearl?
the testfor thing is just really basic I know, what I was looking for are some NBT data tags
I don't really get what the xyz on the player arguement
Jmal116 You could also put coordinates inside the @p of the tp command, so it would look something like this:tp @p[x,y,z,r,team=Orange] ~-5 ~ ~5
or what it really does.
anyways. thanks for the things on /execute, very helpful btw!
There's a couple ways to go if you want to move the center for /execute. First, you could replace the ~ ~ ~ with coordinates, however since you're using the detect feature I wouldn't suggest that, as you'll then also have to shift where you're looking for the block. You could also put coordinates inside the @p of the tp command, so it would look something like this:
For killing the ender pearls, something like this might work:
The player argument on testfor just means a player selector, like @p, @a, or @e. All the parameters and stuff inside the brackets go along with it. The data tag part is where you can put NBT data, and see if the entity matches the data. When run on a clock, this command will output through a comparator if it finds somebody, and the comparator will turn off if it doesn't. There's a bit more weirdness to it, but that's the basic idea.
And maybe I'm bad at reading, but I'm having a hard time figuring out what your issue is with clone. Keep in mind that enderchests don't carry their inventories, the players accessing them do.
tp @p[x,y,z,r,team=Orange] ~-5 ~ ~5As for the error message, that's just a weird thing with execute. That error message really tells you nothing, just because it so often gets stuck like that. Basically it's trying to say that it found you, but there was either an error in the command or you did not meet the the detect requirements. The problem is that even if the command then runs successfully, the errors tends to not go away.For killing the ender pearls, something like this might work:
execute @e[type=ThrownEnderpearl] ~ ~ ~ detect ~ ~-5 ~ iron_block -1 kill @e[c=1]The player argument on testfor just means a player selector, like @p, @a, or @e. All the parameters and stuff inside the brackets go along with it. The data tag part is where you can put NBT data, and see if the entity matches the data. When run on a clock, this command will output through a comparator if it finds somebody, and the comparator will turn off if it doesn't. There's a bit more weirdness to it, but that's the basic idea.
And maybe I'm bad at reading, but I'm having a hard time figuring out what your issue is with clone. Keep in mind that enderchests don't carry their inventories, the players accessing them do.
