6

COMMAND BLOCK USERS, HELP!

Missing_N0 10/30/24 9:35 am history
379
11/3/2024 8:02 am
I'm making a FNaF Pizzeria with (almost) Every single FNaF Animatronic in minecraft (with the help of mods, ofc) and I've gotten into a problem

I want the entities (Whichever one who stands on a pressure plate, not any others, just the mob that stands on the plate) to teleport to a room so that they can attack the player

BUT THERE ISN'T A /tp COMMAND THAT ONLY TARGETS THE SELECTED ENTITY (Not Player)

I'm really confused on how this works and I need some Command Block Pro's to help me set up a command.

I hope I explained my problem clearly

Pls Help and Thanks for the help

Edit: It's in 1.20.1

Edit Two: Just found a mod that fixed this problem but I still would like some Command Block solutions if it doesn't fully work how I want it to, Thank You :)

Edit Three: using the command @e with a tag teleports ALL entites if the pressure plate is activated on top of the Command Block! AND there are 84 total Animatronics in this world. So, sorry if this was your first thought, I've tried it on a duplicate world and it doesn't work. I just want whatever current mob/entity that's on the pressure plate to teleport somewhere else without ALL of the other mobs/entities teleporting with it.
Posted by
Missing_N0
Level 29 : Expert Dragonborn Goblin
54

  Have something to say?

JoinSign in

27

Cornbread_Alphanumeric
11/02/2024 8:49 pm
She/They • Level 54 : Grandmaster Miner uwu
you could use selector "@e[​r=(number)]" to select only the entities within a specific radius of the command block. that's what i normally do.

if there are multiple command blocks in the chain, you could also nest their commands in an execute command, which would allow you to run the command at a specific coordinate regardless of the position of the command blocks.
3
Missing_N0
11/03/2024 8:02 am
Any/All • Level 29 : Expert Dragonborn Goblin
That could actually work!
2
Playmobil_123
10/30/2024 12:34 pm
Level 7 : Apprentice Miner
Acho que :/tp @e[type entity ~~~
4
Missing_N0
10/30/2024 2:35 pm
Any/All • Level 29 : Expert Dragonborn Goblin
I would use this, but there are 84 Animatronics in the mod I use and if one animatronic steps on the pressure plate, it'll teleport ALL of the animatronics to the room I want them to go to. Thanks for the attempt tho
3
Papa Enny
11/01/2024 10:22 am
Level 62 : High Grandmaster Answer Dwarf
/tp @e[​type=Entity,limit=1] ~ ~ ~
3
Missing_N0
11/01/2024 11:05 am
Any/All • Level 29 : Expert Dragonborn Goblin
I would do that but I'd have to register 84 different types of animatronics . . . And that's a lot of typing
3
Papa Enny
11/02/2024 11:43 am
Level 62 : High Grandmaster Answer Dwarf
history
why so many? or can you name those mobs?
3
Missing_N0
11/02/2024 5:59 pm
Any/All • Level 29 : Expert Dragonborn Goblin
too many to count!
3
PlanetNydro
10/30/2024 11:28 am
He/Him • Level 33 : Artisan Loremaster Mage
something like @e[type=namespace:entity_type,tag=custom_tag,limit=1,sort= nearest,distance=2] should work? I think?

I think it would just grab the nearest mob to wherever the command was executed that meets the requirements.
You don't necessarily need both type and tag, but you can use either. or both. It should just grab the nearest mob of the correct type/tag. You can not use either to just have it work for anything that steps on the pressure plate. The distance property can be changed/removed. Its basically just there to prevent it from grabbing one thats too far away if something else triggers it.

I don't use command blocks all that often, so I'm not 100% sure this would work, but I think it would be pretty close to what you're looking for at least.
3
Missing_N0
10/30/2024 12:20 pm
Any/All • Level 29 : Expert Dragonborn Goblin
I feel bad for the spam you got.

But this helps also :)
3
PlanetNydro
11/01/2024 10:18 am
He/Him • Level 33 : Artisan Loremaster Mage
glad I could help :)
2
SevenTheGamingKitty
10/30/2024 10:13 am
Any/All • Level 17 : Journeyman uwu owo
try @e[​distance=insertanumberhere]
not sure what versions it looked on because i simply took a quick look at the internet but it should still work
3
Missing_N0
10/30/2024 12:18 pm
Any/All • Level 29 : Expert Dragonborn Goblin
Also, just thought i'd be clear, this teleports ALL entites

@e means all entities same how @p means all players. Still helpful tho
2
Unztable
10/30/2024 10:08 am
Level 32 : Artisan Blockhead Lego Builder
history
do a different tag for every animatronic (xis the entity, X X X is the coords)

to tag the animatronic, just use a name tag

/tp @e[​type=x,tag=freddy] X X X facing X X X
3
SevenTheGamingKitty
10/30/2024 10:10 am
Any/All • Level 17 : Journeyman uwu owo
that only works if you're expecting a single entity type and not others
3
Unztable
10/30/2024 10:14 am
Level 32 : Artisan Blockhead Lego Builder
not really bc the tag can be used to differentiate entities
3
SevenTheGamingKitty
10/30/2024 10:15 am
Any/All • Level 17 : Journeyman uwu owo
i don't think you understood me correctly
THAT ONLY TELEPORTS CERTAIN ENTITIES THAT EXECUTE IT, NOT ALL TYPES THAT DO SO
3
Unztable
10/30/2024 10:22 am
Level 32 : Artisan Blockhead Lego Builder
history
not sure you understand me either.
A tag is used to differentiate from each other of the SAME ENTITY.
3
SevenTheGamingKitty
10/30/2024 10:27 am
Any/All • Level 17 : Journeyman uwu owo
except then a character without the tag can't teleport, which defeats the purpose

the only differentiation they want is between the one activating, and the ones not doing so (you didn't get the memo)
3
Missing_N0
10/30/2024 9:36 am
Any/All • Level 29 : Expert Dragonborn Goblin
I bet you it's gonna be the most simple answer known to Gaming Kind
2

Welcome