#Commands General
1 messages · Page 3 of 1
its possible to add more than one Molang condition in playanimation command? I need variable.is_first_person || query.any_animation_finished but is not working if I use it like that
if I load a structure block in a tickingarea where a player isn't, it doesn't seem to load the structure
does not work
/damage @e[r=6,y=~0,dy=12] 25
Someone help me, In this update it's turning yellow, I want the white color
execute as @s at @s anchored eyes run camera @s fade time 0.0 0.8 0.3 color 249 225 25
This one is taking away the night vision
execute as @s at @s anchored eyes run camera @s set minecraft:free ease 0.0 linear pos ^ ^ ^3 rot ~ ~180
color 255 255 255
If you're on 1.20.10
Rendering of experimental
minecraft:freecamera no longer affected by player state like night vision
2 different commands
you can branch out, won't kill anything
Im one day old learning camera have the colour thing
Is there a way to set the color to translucent?\
Alpha channel thinggy?
yeah haha you always learn new things, for example yesterday i learned that if you put a # before a fake player it actually hides it from displaying on any display if /scoreboard objectives setdisplay is used
alpha value usually controls transparency
I know
Asking if its possible in /camera?
Seem like it only receive RGB value
oh sorry i dont know the camera command thing i thought you were talking about a alpha argument in the command
lol
not possible sadly @jade storm
color is used for fading / transitioning
not as a permenant overlay
I want to make like a red warning thing in old video game
Where like your screen flashing red
But pure red....is too much
Ah still not possible sadly
I know
Time to ask Mojang to make it
lmao fr
laughing my ass off, for real
is there any way to do on a sidebar like the players battlePassXp and then the battlePassLevel x20 ( battlepasslevel x 20 is the equation to work out the XP)
What
e.g like on my sidebar i want to do level:100/200 {1} but to get the /200 i was wondering if i could do the Level they are x20 since for every level you get in my mod it times the level you are by 20 to figure out how much you need to level up
With just cmnds you can do that in a weird way
Basically you need a fake player with a score of 20 under any objective, for the example I’ll say “Twenty” has 20 in Count
Then you can do
Execute as @a run scoreboard players operation @s neededXp = @s level
Followed by
Execute as @a run scoreboard players operation @s neededXp *= Twenty Count
That should get you the exact number you want
how would i imput that into a sidebar thoguh
my current command titleraw @a title {"rawtext":[{"text":" §7-= §cPVEWORLD §7=-§r\n\n • §aName§r: "},{"selector":"*"},{"text":"\n • §7Time Played§r: "},{"score":{"name":"*","objective":"hours"}},{"text":" Hours\n\n§7 -= §bMember §7=-§r\n • §gCoins§r: §g$§r"},{"score":{"name":"*","objective":"money"}},{"text":"\n • §dLevel§r: "},{"score":{"name":"*","objective":"battlePassLevel"}},{"text":"\n • §4Prestige§r: "},{"score":{"name":"*","objective":"prestige"}},{"text":"\n\n §7-= §bServer Info §7=-§r\n • §l§bPlayers§r: "},{"score":{"name":"idg","objective":"id"}},{"text":"/11\n • §l§9Discord§r: ########\n • §l§2Realm§r: ########"}]}
After running those cmnds you just get the players neededXp score
do they need to be on a repeat cmd block or just once in chat
Those two cmnds will have to be in repeat always active
ok thanks
i get an error from it
(my username)
@rain lance I get the error from both CMD blocks just realised that now
also realised its x65 not x20
Show me the cmnd please
That’s a simple change
Either change the value of fake player “Twenty” to 65 or make a new one called “SixtyFive”
Did you set Twenty Count to a value?
Might as well change it to SixtyFive
never used scoreboard operation before
/scoreboard players set sixtyFive count 65
i already changed it to sixtyFive
Alright
lattice
Capitals matter by the way
Yo?
ned nerd hep
Wsp
Gay
Dm me
yesssirr
Sorry @heavy holly
oh
this is the updated cmd for sidebar btw titleraw @a title {"rawtext":[{"text":" §7-= §cPVEWORLD §7=-§r\n\n • §aName§r: "},{"selector":"*"},{"text":"\n • §7Time Played§r: "},{"score":{"name":"*","objective":"hours"}},{"text":" Hours\n\n§7 -= §bMember §7=-§r\n • §gCoins§r: §g$§r"},{"score":{"name":"*","objective":"money"}},{"text":"\n • §dLevel§r: "},{"score":{"name":"*","objective":"battlePassXp"}},{"text":"/"},{"score":{"name":"*","objective":"neededXp"}},{"text":"§7["},{"score":{"name":"*","objective":"battlePassLevel"}},{"text":"§7]"},{"text":"\n • §4Prestige§r: "},{"score":{"name":"*","objective":"prestige"}},{"text":"\n\n §7-= §bServer Info §7=-§r\n • §l§bPlayers§r: "},{"score":{"name":"idg","objective":"id"}},{"text":"/11\n • §l§9Discord§r: ########\n • §l§2Realm§r: ########"}]}
That one first
You making a PvE server?
Yeah, originally made one in 2018 called Pve Dungeons and everybody who played it seemed to like it so im recreating it
its been a royal pain in the ass tryna get the level system done
Damn
ill be posting some things from in it showcase soon
Im utter shit at building
its hours of building dungeons
thankfully i only have to do the base and the rest of my helpers detail it while i work on the scripts and stuff
i gtg now
Bye
nice can you ping me when you do?
sure 👍 Probably be in a week or so so that i can finish some of the dungeons
Is it possible with like @a[scores={money=100}] to not make it a specific number? like @a[scores={money=100-200}]
almost like lm and l
..100 = <100
100..200 = 100 -> 200
100.. = >=100
so specifically @a[scores={money=100..200}] should work
thank you
How would i add a scoreboard for every hour a player has played
Could just do it from seconds and use math for hours
does a failed execution of a command count towards the 10k command limit in a single function file?
TAGS IGNORE
Money pouch
MCPE
Minecraft
Minecraft Bedrock
Minecraft PE
Minecraft command
Money converter
Kill counter
Death counter
How to
how to make
PS4
PS5
XBOX
PC
windows 10
microsoft
Command Central
How to make crates MCPE
Best mcpe commands
mcpe faction commands
mcpe skyblock comands
mcpe kitpvp commands
i...
thanks
yup
how can i randomly spawn for example 5 entity to specific block?
for example
green - custom block
orange - grass block
red - entity
i want to summon 5 entity randomly in that area only (custom block)
Hello is it possible to use the nbt itemlock in /replaceitem command?
spreadplayers command I think
Summon them first then /spreadplayers @e[type=your:entity]
ohh ok
hi there, so I have a problem that sometimes command blocks (repeating) stops working, what can be the cause of it?
I notice this happen always after I recover a backup file, so all the repeating blocks become "Impulse" blocks for no reason, there is any fix for that? some thing that I can do to "re-enable" the repeating blocks back globally instead fixing one-by-one?
I don’t think so no, unless you update the blocks with redstone (externally, using /fill for example), but assuming they are always active there’s not much you can do
Yep, using /spreadplayers is your way to go Joshua
I want to make a teleportation crystal that teleports to 1 of 5 locations of your choice, and will leave behind particles
How can I do that?
put an in is armor stand 10 blocks above where you want the crystal with a name
execute at @r armor stands with name and then use /particle and / to then to it 10 blocks below the armour stand
I don’t need random points, but certain ones, and this should be in the addon, but I don’t know how to do it
wdym
certain spots you just summon the crystal?
and use /particle for the particle
@cloud field
Huh
They already explained to me how to do it, it is necessary to add a java script to the addon
But
[Scripting][error]-Plugin [§a§lMForm§7 (BP) [1.0] - 1.0.0] - [systemFiles/index.js] ran with error: [TypeError: cannot read property 'subscribe' of undefined at <anonymous> (systemFiles/trigger.js:9)
]
If you need help with the Script API, I recommend you going to #1067535382285135923
Thanks
[Commands][warning]-Function core failed to load correctly with error(s):
[Commands][warning]-Error on line 47: command failed to parse with error 'Erro de sintaxe: ":": inesperado em "isel_type"»:«"smooth"] "'```
What's wrong?
**execute as @a at @s[x=1,y=-64,z=1,dx=-2,dy=218,dz=-2] if block 0~ 0 quartz_block ["chisel_type":"smooth"] run effect @s levitation 1 5 true**
Use = instead of :
["chisel_type"="smooth"]
how do i detect if all players has a score of 1 in a scoreboard? like if i have 1 and some1 else has 0 nothing happens but of both have 1 it happens something
ik is with execute but idk how
execute unless entity @a[scores={score=0}]
thanks btw
Can I select entities using multiple parameters in the same command
like @e[family=player,family=monster] ?
or do I need separate commands
/execute as @e unless entity @s [family=!player, family=!monster] run say I am either a player or a monster.
If you put them in same command like this it won't work. Because there is no entity that belongs to the family of players and monsters.
But if it was to say something like this:
/tag @e [family=monster, family=zombie] add monster
This could work since the zombie family belongs to the monster family.
Similarly there are some selectors you logically cannot use twice.
Examples:
/kill @e [type=cow, type=pig]
(An entity cannot be a cow and pig at the same time)
/kill @e [name=Steve, name=Alex]
(An entity cannot have more than 1 names at the same time.)
Thank you!
hello I want you to leave if you have two or more
/testfor @e[type=cow,c=2..]
does not work
if i use c=2 the comparator activates even having only 1
Can tellraw commands say stuff from json file
c=..2
Limit can't use range integer
I believe c=2 should work even if you have 3, 4, etc..
Plus, you can always use:
https://wiki.bedrock.dev/commands/entity-counter.html
Who can suggest a command that removes spam from commands in the chat
gamerule sendcommandfeedback false
Thanks
How
type /gamerule sendcommandfeedback false
It did not help
/gamerule commandblockoutput false
Thanks
hello people
do command groups exist? someone basically told me i could do execute as @a run give @a diamond { say YOU ALL GET DIAMONDS } basically what they said thatd do is it would only run if the first is true, so basically a conditional and i wanted to know if it was true or not and if not if theres any way to actually do so
No.
Source pls
You can't
can i do it with 2 functions though?
yes, there's no point in giving conditions since it's for all players
/execute as @a run give @a diamond
/say YOU ALL GET DIAMONDS
gega it wasnt a specific thing
i made it as an examplea
example*
im trying to make a sell thing without making every sellable item individually
i want there to be one place to sell everything form
from
I have a regolith filter that does this.
https://bedrock-oss.github.io/regolith/
https://github.com/Hatchibombotar/useful-regolith-filters/tree/main/functioner
say hello!
execute as @s[tag=target] run {
say bye
}
is regolith an ide?
oh okay
It wouldn't work if you were using bridge though
thank you
np
why dont this work?
/summon minecraft:zombie ~~~
Also get this error from /summon zombie ~~~
If you have 6 people, then the command is ran on each person, meaning 6 diamonds is given to each player. Since one person generates one diamond to all players. It might be better to just use “give @a diamond” instead of using execute.
i used that as an example
.
any other suggestions THEN?
caps
hello
I want my command block to test if it has a block on its side, after that it activates a redstone signal
conditionals like command blocks are impossible to recreate in functions as we dont have access to previous execution results of a command
Testforblock ~1~~ [blocktype]
or:
execute if block ~1~~ [blocktype] [blockstate(optional)] run ...
would it be better to have 10 functions with 2 commands or 1 function with 20 commands?
better as in better performance
i doubt theres any difference unless your running them at different speeds
in both cases they would run in the same tick
in this case ill just pick the first one since its visually clearer
yeah should be the same then
alright thanks
1 function, since if its 10 functions you basically need to call every function too so it would be total of 30 command executions compared to 21 if it would be 1 function
fair point
but there is a point to be made that in a lot of situations you need extra commands for conditions when using only 1 function, at least for mine i do
so when only looking at this specific situation, which is better, 10 function 2 commands each, or 1 function with 20 commands
i mean if both options keep relatively the same command sizes then 1 function will always be better since its still less commands, but if you find yourself at a place where you need to repeat executes move it to a function since that would only be 1 execute needed then, but all in all just use what is more optimal for you since commands can vary widely and theres no solution that fits all
i was asking for ide suggestions
mb for ping
xd you dont have to apologize for pinging considering my name, but the closest conditinoals you can get while also being able to use them is /execute <if/unless>
how do i load a structure without keeping water? random blocks of water stay after i load a structure
this should be bedrock sorry if it isnt, but you can toggle this waterlogged boolean to false so it doesnt load water, if you're taling about just water blocks you'll have to first extract the structure you want to save with /clone and then actually save it
is it possible to load a structure in water and removing the water?
no you'll have to keep the water or modify it with commands first
i see, thanks
If I am not mistaken, having void blocks may help with that.
These can be placed down to remove air blocks, which tells the game when loading in this structure, these void blocks cane be overwritten by the surrounding terrain (or water in this case).
This is also how you can have structures embedded in block in the world.
ah yeah structure_void pretty helpful but just doing /fill to replace the water and then saving should also work but structure void could techancly be better to stop refilling of water, but you have to make sure you dont load it into blocks
oh yeah forgot about structure voids, thanks
yup, and best part is the structure can be partially submerged.
@subtle oasis
Best tactic I use is fill replace air blocks in the designated space of the structure.
is it possible to detect with unless execute commands if there is a specific entity in the same block
i tried
/execute as @e[type=chicken] at @e[type=chicken] unless entity @e[type=chicken,r=1] run kill @s
but it doesnt work
unless entity means if there are none entities
hmm so if it checks it self
if you want to check if 2 of the same entities are in the same block you could use
/execute as @e[type=chicken] at @s if entity @e[type=chicken,r=1,rm=0.01] run say theres another chick with me in the same block
you would need to use align to actually make it the same block tho
i want to run the kill command only when there's 1 entity in that same block
and using dxdydz would make it an actual block
ah
i dont need as and at since a block is going to run it
/execute as @e[type=chicken] at @s unless entity @e[type=chicken,r=1,rm=0.01] run kill @s
should work then
ah okay
the additon of rm is the important part it basically means any entity which is at least 0.01blocks away which should normally be all except the executing one since that is exactly on its spot so it cant be further away from itself
you mean still kills it if there are multiple chickens?
let me test
this is very interesting, it seems like this command always kils alls chickens except 1
/execute as @e[type=chicken] at @s if entity @e[type=chicken,r=100,rm=0.01] run kill @s
that defintly says something about its execution flow
yeah
alright so it does work like its supposed too but the only problem is with the method i've given theres a tiny exclusion which is, if the other chicken is exactly on the same position and i mean exactly then it ignores it because its basically invisible to it, but otherwise it works as intended
yeah i actually managed to find the solution thank you
np
limit it to one entity
/execute as @e[type=chicken,c=1] at @s if entity @e[type=chicken,rm=0.01,r=2] run kill @s
or only check if it has special tag
/execute as @e[type=chicken,c=1,tag=check] at @s if entity @e[type=chicken,rm=0.01,r=2] run kill @s
The previous command means that it applies to every chicken, that's why it kept killing all the chicken.
what did the poor sapling ever do to yo? D:
Well there was this one time when some dark oak saplings GREW over me while I was exploring, sending me to deth's cold embrace by suffocation 🌳 🙏
so racist smh
🌳 😤 🌳 😤 🌳 😤 🌳 😤
Is there a way to summon a charged creeper? I’ve looked online but it’s all for java so it doesn’t work.
Did you examine the code to find an event that activates that component group....? If you find one, then summon it with that event.
Or just summon lightning at the creeper
I’m not great with events so no I have not looked at that. And they will be in a box so I don’t think the lightning can get to them. Thanks anyway!
So this is where you start to dabble a little and learn about entity files. This is the event that is called to make the creeper do thatjson "minecraft:become_charged": { "remove": { "component_groups": [ "minecraft:exploding" ] }, "add": { "component_groups": [ "minecraft:charged_creeper" ] } }You can use this event in commands 2 ways:
- /event entity @e[c=1,family=creeper] minecraft:become_charged
- /summon creeper ~ ~ ~ facing @s minecraft:become_charged (of course change the ~ ~ ~ to a safe distance)
Ok, thanks!
bump
u can't
You can't vanilla "grow" it but you could save the corresponding trees in structures and load it at the sapling to simulate a "growth."
You'll need to save multiple structures if you want it to have variations. Or have the logs & leaves randomly generate if you would like to take extra steps.
I've thought of using the structure command, but for some reason, it doesn't load the structure "centered" to my position even if I place the saving structure block directly in the center.
You will need to offset
Is that option present in the command itself?
Hmmm I think it could be done...
Thanks
What is tickingarea prereload?
Load the area before loading whole world chunk
Ticking areas typically load after the world is launched, unless it is marked with "preload". Ticking areas that are marked as preload will be loaded before loading other chunks when launching the world. This could be a useful tool to load some things orderly.
-- Minecraft Wiki
Ex: /strucute load tree ~-5~~-5
how to make a function run in tick.json
Example:json { "values": ["compass/control"] }
Thanks
can I detect if player is riding an entity?
Would also recommend reading:
https://wiki.bedrock.dev/commands/mcfunctions.html
/execute as @a at @s anchored feet if entity @e [c=1, type=camel, r=0.01] run say riding a camel
You might need to adjust the radius and positioning but I think this is pretty much the way to do it unless you'd like to opt for scripting api or some add-on way of detecting.
does that only detect camel
Replace with family=mob if you want it to check all mobs
thank you
oh ty
No need for Script, you can use Molang for that
query.is_riding
since when do armor stands get /killed without a death animation?
IDK, I /kill my armor stand without a death animation xd
it's just the death sound Somehow its silent
I thought they always did that
Nope, they made a death sound along with white particles
Oh that yeh ik that exists. Just the turning red and 90° angle
yeah i used to always kill them by tping them to the void since a random dead armor stand with a bunch of particles spawning never looks good in a map
hi
is there anyway to put the first person camera with another point of view with the new camera command? like i want the first person camera to be 1 block above the player with the player hand etc literally the 1st person camera
how would i remove all tags beginning with nick: from a player
scripting
since you know the name of every tag you apply just do
/tag @a remove nick:test
/tag @a remove nick:test2
/tag @a remove nick:test3
tryna make it so it removes from player when they click a button, but since its a custom nickname i dont know the name and it needs to be unmanual , i put in scripting but just wanted to try here first, thanks for tryna help though
ah well yeah if you're using scripting it would probably be smart to continue using scripting
Could someone help me with the /execute command, so that if the score of a person is 40 it executes a command
execute if score <target> <objective> matches 40 run <command>
thank you!
Is there a way to have a command run for only hostile mobs?
Like /kill @e[type=monster] or something?
family=monster
Oh, awesome
Hey why is it giving an error i did the calculation correctly
if you names start with numbers or some special characters you need to put them in quotes ""
@topaz venture fix the error
Looking for a commands dev free dm me
Am I actually lacking braincells? Made a new pack, trying to use the new execute syntax in a function, but still receiving content log error.
Manifest format version is 2, min engine version is [1, 19, 10] (also tried [1, 20, 10])
{
"format_version": 2,
"header": {
"description": "...",
"name": "...",
"uuid": "...",
"version": [ 0, 0, 1 ],
"min_engine_version": [ 1, 19, 10 ]
},```
here's the direct content log error if that helps, plus the command causing the error - command failed to parse with error 'Syntax error: Unexpected "score": at "xecute if >>score<< playername..."'
execute if score playername objectivename matches 1 run somecommand
scoreboard players set "5s" ticks 100
Needs to be 1.19.50 or higher
yeah but he tried 1.20.10 too
1, 19, 30?
Can I clear a non player entity's inventory without using replaceitem on every slot?
or is there a way to check that all its slots are empty?
Scripting
hasitem
don't you have to use a not equal to hasitem for every single item?
is there a way to check for empty slots with hasitem?
i think checking for an air item should work
i get no targets match selector for both commands execute as @e[type=zombie,hasitem={item=air,location=slot.weapon.mainhand}] run say test execute as @e[hasitem={item=air,location=slot.weapon.mainhand}] run say test
hm yeah the only thing i really know about hasitem is that if quantity is set to 0 it basically inverts the hasitem
can be limited the Y value from /spreadplayers command?
my mob sometimes teleport in a cave
Last I used that command, that shouldn't be happening.
It only teleports players to blocks which have no other blocks between that coordinate and the sky
yeah usually /spreadplayers teleports to the highest possible block which you can stand on, altho i have been hearing complaints that it tps you to the maximum height recently
its not working like that for me
ahh sorry I made a mistake in the command
thx for your help
is there a checker / detection like execute if block is not air, then run <whatever> nvm, got it.
lmao the fact that you almost perfectly described the syntax before asking is amazing
can you summon tnt that doesnt destroy blocks but still does damage?
you could disable tnt destruction
how do i do that tho cuz it aint a gamerule
ah thought it was
just tnt explodes
Is that a new entity event for tnt?
Oh mb, didn't see your question above lol
Yeah /gamerule command
I thought it was for /event command
Turn off mob grief
Oh right
mob griefing does affect tnt
helo, quick question, does /give command send / broadcast message to the whole players like when you give someone something like, for example /give Player1 my:poo, and to me (as Player1), it shows Player1 has been givien... but does it broadcast to other players also? me don't have friends to try 
It do, there's gamerule to not show the command feedback
/gamerule showcommandfeedback false
For command block
/gamerule commandblockoutput false
Oh, okay. Thanks
js so yk showcommandfeedback is sendcommandfeedback now
in a like @a[type=zombie] how do i add mutliple entities?
you cant, you could either use family and hope the family you want exists, or if you really want to use type for multiple entities you will have to do type=!x for every other entity that you dont want to select
im jus gon give them a tag and do tag= instead
oh yeah thats a multicommand solution too
how do you set a camera to follow you?
and is there a list of possible values for camera presets?
/camera sets the camera to an exact locations, if you want to smoothly have the camera follow you you’ll need to use an execute command (normally in a tick function or repeating command block) to set it to a certain position near the player
thx
how do i determine if theres 0 of a certain type and execute a cmd (using one command)
/execute unless entity @e[type=cow] run say there are no cows
you might have to limit the selection of entities to 1 by using c=1 because minecraft stinky, so
this should have been fixed and c=1 should not be nessecary anymore
/execute unless entity @e[type=cow,c=1] run say there are no cows
i just get error execute subcommand unless entity test failed
from both
yeah that should mean that cows were found, and thus not executing the command
oh right
spawned a cow in and its still giving that error
yeah its giving that error because there are cows, you need to kill all cows and then it wont error, since you said you want to test 0 of a certain type
does the new execute work in functions?
Command:
/execute at @a[hasitem={item=stick,location=slot.weapon.mainhand}] run setblock ~~2~ stone
Error:
The command itself is correct, probably your manifest which causes it.
is there a max limit of cmds in a function??
should be changeable with a gamerule as far as i know
yeah but do keep in mind that the 10000 limit talks about execution of commands, so if you called a 10 line function 10 times it would be 110 commands,
can somemone help with this it was working earlier??
the scoreboard command failed so check for:
if the objective exists
if the target exists
also the c=1 for if/unless entity should have been fixed
So are "execute as @a" and "execute as @a as @s" the same thing? If not please explain the difference.
The difference between them is that when you use as @a you're running the command as that entity, but the location where the command is being run does not get changed to the specified entity location.
Putting this command in a command block and running it each tick: execute as @a run setblock ~~-1~ stoneWill change the block underneath the command block instead of the player.
yeah "execute as @a" and "execute as @a as @s" are the same
Technically it's not, "as" specified the command to run as the entity, while "at" specified the command to run at that specific entity location
thats nice but i recommend you take a good look at the command again
I mean, besides the original problem, "as" and "at" are different.
okay but you do realise in the command given by flame, both things are "as" not 1 "as" and 1 "at", both are "as"
i think the majority of the command community can agree that "as" and "at" are different tho haha
Oh, damn, so it was as @ as @ I thought it was as @ at @
I'm blind.
haha its alright its not many of times people ask a question like that and how extremely similar as and at are its very easy to just mistake the as with at since thats one of the most common asked execute questions
So adding the extra 'as @s' doesn't do anything?
yes
'as @a as @s'
as @arun for each online players.as @sself-execution. (Which is unnecessary)
Oh I thought '@a' just made it run once on all players and by adding the '@s' would specify each player
Thanks I'll be able to simplify my commands and make them smaller
no each part of the execute will always do the same thing and will not have seperate logic, and also just imagine that every single thing like "at", "as", "positioned", "rotated" etc all just set specific things in the commandcontext
Your words confused me, the fastest way to understand is to just test it.
hi there, is it possible to use the fill ~-10~~-10 ~10~~10 awp:red_fire replace air in combination with the execute unless to fill only if the bellow block is not air? because it will need to test for the entire range and not a single block position
yeah but i think through testing its even harder to understand it exactly since you dont know every detail thats being changed
Is there a way to set speed without changing the FOV?
I tried by setting a camera it doesn't work
you cant have ~ and ^ at the same time?
yeah it doesnt make sense, but there are easy workarounds like just doing them separately
player.json
fill ~ ~ ~ ~ ~1 ~ light_block ["block_light_level" : 15] replace airWhats wrong?
There's something weird happening with /clear command
There's no way to clear dye of all colours at once
/clear @p dye clears only inc_sac
/clear @p inc_sac also clears inc_sac
try:
/clear @p dye -1
I have tried everything nothing works
Try multiple /clear
/clear @p dye -1
/clear @p dye -1
/clear @p dye -1
/clear @p dye -1
Is there no way to clear all types of dyes in just one command now
yeah i tested it seems you just need to do every data indidually
/clear @p dye 0
/clear @p dye 1
/clear @p dye 2
/clear @p dye 3
Which is annoying
i mean its really not that common when you need to use all kinds of dyes and then also need to clear all of them
you can just setup a function or a command block functions so you dont need to repeat anything
Yes, but it doesn't make sense. It used to be possible before they updated the command. You can clear all colours of concrete with just /clear @p concrete so why not dye
concrets are blocks so thats a different question
Is there any way to randomly tp an entity around me besides using spreadplayers?
unless you want to get complicated no
Spreadplayers sometimes transports the entity to places I dont want it to go
Oof
Do tell me about how it could go though
well you can randomise a scoreboard value and then transfrom the scoreboard value using binary to the entities position relative to another
Seems complicated. Why didn't they add a y value to spreadplayers anyway 😦
Thanks for replying
no problem
well spreadplayers just tp them to the highest position where they can stand
Yeah, I meant that they could add an optional y parameter so that they remain in the y~ level of where they were originally.
So I got a serious question I know they say tags on a player can cause lag but but how noticeable can it actually be?
So hypothetically if there are 20 players on a server and have like 10-15 tags on each of them how bad would that affect performance?
Depending on how often you read/modify the tags and how many players are executed, I think.
everything causes lag, just do what you're doing until you're actually feeling lag and then you can optimise
remaining in the same y position is way to specific if anything it will also be a random y position too
I'm just trying to figure out possible reasons my cpu and ram usage is low on my server but yet lag gets bad.
yeah i highly doubt just some tags are doing that tho
but if you really want to optimise you can either switch to scoreboards dont really know if that helps, but the most simple advice which you hopefully were already following is using tags for only true/false things or classes like things
yeah im gonna keep doing research to try to figure out why its happening cause it makes no sense tbh.
unless some of the people on just have that high of ping its messing everyone else up
huh is this still true? i thought they fixed it.
no clue which is why i asked.....
as by reading my other messages i explain my thought process
yeah i think they did
/execute as @a[hasitem={location=slot.weapon.mainhand,item=air,quantity=0,slot=0}] run say I'm not holding any items
in a nutshell: quantity = 0 is air
put anything inside item =
could be dirt, item = dirt
Cannot be air
but quantity = 0 is possible
item=air doesn't work for hasitem but the same code can be used to test any other item ^^
#test item
give @a barrier 2304
#Your Commands (example)
effect @a [hasitem={item=barrier,location=slot.hotbar,slot=8}] slowness 1 1 true
#delete test item
clear @a barrier
kill @e [name= "Barrier"]
Alternatively:
/replaceitem entity @a slot.weapon.offhand 0 keep barrier 1 0
/execute as @a if entity @s [hasitem={item=barrier,slot.weapon.offhand}] run say my offhand slot is empty
/clear @a barrier
Hi can anyone tell me why this command
execute if block ~~~ air run setblock ~~~ light_block ["block_light_level"=15] replace
Runs ingame but fails if inside an entity or function file?
the block at the entities position wouldnt be air, or they couldnt place the light block
The command works when typed ingame. I don't understand why a function containing this command doesn't work.
I'll try and use fill instead maybe it'll work
Nope, it doesn't
I think the bad thing here is in the
["block_light_level"=15]
part, for some reason. How is this fixed?
Hello! please help with the team. I need the command to rotate the entity 90 degrees.
Your BP/RP manifest version should be >= 1.19.80 for this to work I believe.
if its tick.json position will be 0 0 0
in entity file it will be the entities position
in chat your position
check your min engine version
What's the difference between saving a structure to disk and memory, and does either output an actual .mcstructure file that can be accessed?
memory should save it only for the current session so when you leave it will be deleted
Good to know
Is there a way to detect what way a player is facing and make a row of particles spawn in that direction?
you can make particles in front of a player anytime but i dont think that you can exactly achieve what you want to have
use rx, rxm, ry, rym from selectors args
@topaz venture Is this command correct?
execute as @a[scores={running=1..}] run title @s actionbar Hello!
in the newest mc version its a syntax correct command
That looks correct for the new execute syntax.
Now this post will come out when I ran
I think this is a simple command but my brain is like at 10% so
How can I run a command to compare between two scoreboards and set to 0 the one with less scores?
So basically:
5 < 10 = 0 < 10
execute if score @s thing < @s thing2 run scoreboard players set @s thing 0
execute if score @s thing > @s thing2 run scoreboard players set @s thing2 0
@gritty musk I think this works
not tested
I bet my left thumb that it will work
I will test when I get back from my classes, thank you!
Doesn’t works at all 😭
oh wait, works perfectly!
There was a typo on my end, my bad
Thank you very much hatchi! ❤️
Anyone know a way to /kick programmatically. I know api can run kick. i have tried a few things in mcfucntions and they don't seem to work either. is it only command blocks that could use /kick?
Functions can if you set it a defined target iirc
You cant do that anymore afaik. You must specify the player name
yeah afaik it was because of that and hackers using it
They should at least make it executable through .mcfunction or .json files
I wonder if setting the min engine version helps
Back to like 1.14 or smtn I think
You should still be able to use newer commands from a second BP of latest version
Plus you can call functions in packB from functions in packA
Would be nice if they added a way to set the permission level functions are ran with.
On Java, that's something you can change for dedicated servers in their config. So you can have functions run server admin commands if you really wanted to.
Overall, the command permission system on both versions are terrible. It would be nice if you could configure the permissions for each individual command. Discord does a decent job of that for slash commands.
How would I test if a player is positioned within a radius of a coordinate and execute a command then? hopefully with one command and no entitys, ive tried execute if entity @s positioned 341.49 91.00 -23.45 but thats only 1 coordinate
how to make allay execute the command that teleports to one place. execute at @s run tp @s. only allay does it
or how can i freeze the mob?
Minecraft Commands Communities
If you're interested in joining communities that focus on Minecraft commands, here are some options for you:
-
Minecraft Commands: This community is dedicated to all things related to Minecraft commands. Join to connect with like-minded individuals and discuss various command-related topics.
-
Bedrock Commands Community: If you specifically want to engage with the Bedrock edition command community, this Discord server is a great place to do so. Connect with other Bedrock edition players and share your knowledge and experiences.
-
Bedrock Commands: Another community focused on Bedrock commands, this Discord server offers a platform for Bedrock edition players to collaborate, ask questions, and learn from each other.
Feel free to explore these communities and engage with fellow Minecraft command enthusiasts.
Commands
Immerse yourself in the universe of commands with these useful resources.
-
Introduction to Command Blocks: Learn the basics of using command blocks and executing commands in Minecraft.
-
Understanding Selectors: Discover how to target specific entities or players using selectors in Minecraft commands.
-
Functions: Explore the creation and utilization of functions to store and reuse sets of commands in Minecraft.
These resources offer valuable information and guidance for effectively using commands in Minecraft.
I wanted to add a camera on top of the player down in front of him, I wanted the x and z position to be relative to the player's rotation but the y axis is not
Does anyone know how I can do this? I'm in need a lot
camera @s set minecraft:free pos ^^10^10 rot 90 0
Using this command I get more or less what I want, but I need the Y axis (height) not to change according to the rotation of the game
You’d need to use the execute command to set the y rotation onto whatever you need.
execute at @s rotated as @s rotated 0 ~ run <camera command>
The above should set the y rotation to 0
wow this really works thanks men
Could you explain this to me in more detail?
execute at @s - Sets the position of the command to be at @s
execute rotated as @s - Sets the rotation of the command to be the same as @s
rotated 0 ~ - Sets the x rotation to ~ (which means leave it at the current value) and y rotation to 0
More information on the execute command can be found here
Thx
Does anyone know how I can make a condition with amount of entities in a command? If/unless @e[c=*] doesn't seem to work
You would have to create a scoreboard to score the number of entities.
scoreboard objectives add entities dummy
scoreboard players set entities value 0
execute as @e[type=player] run scoreboard players add entities value 1
execute if score entities value matches 10 run say There are 10 players!
Ah true, someone had already given me this idea before, but I had forgotten
Thx again
No problem
at sets the position and rotation to be the same as @s
how can I remove xp amounts?
I cant set negative values on /xp commands, only with levels
scripting
Can I do line break in lang.json?
Like:
zone.menu1.body=ID: %s \nName: %s
I try =
/tellraw @a {"rawtext":[{"translate":"zone.menu1.body","with":{"rawtext":[{"text":"ID"},{"text":"Name"}]}}]}
show =
ID: ID \nName: Name
I want =
ID: ID Name: Name
as far as I know \n doesnt work in lang files
Ok thanks
Failed to execute structure as null
execute if score round games matches 0 if score n games matches 1 run structure load diamantes2 15984 63 16022
which version are you playing on?
1.20.15
maybe your syntax is wrong?
i think i found the problem
you cant have 2 if-conditions
because the structure will only be loaded if all if conditions are met at the same time
Yeah
use unless
ok
Wouldn't that be too complicated
I mean setting perms for each command. Or did you mean setting the perms via behaviour pack
Imo it would be best to have a default permission level for all commands. And then allow players to set individual perms for separate commands via some .json file in the BP
Yeah, it could be a file, UI, etc. More control would just be nice.
How could I rotate an entity with old-syntax commands?
execute @e[...] ~~~ tp @s ~~~ ~10
entity rotates strangelly. I used tp @s ~~~ ~90~ called via function
If it was initially aligned to the grid, and that command was run after, it should've rotated 90° while still maintaining the alignment no? :S
Did you also try definite values
~~~ 90 ~
Some entities also just have weird facing directions and rotations. Example: boats
Nvm, I've fixed it via 4 different entities 🌚
Damn :S
Otherwise I'd struggle for other ~5 hours
I mean you could've tried finding the specific values through trial and error increments 😅
But if this method isn't much different in terms of optimisation then..if it works it works xD
What are the blockstates for the beacon?
probably there aren't any
Why is your framerate better than my computer
client animation:
"rotation": [
0,
"-q.body_y_rotation + (math.round(q.body_y_rotation / 90) * 90)",
0
]
clamps the rotation to the nearest 90 degrees
I've tried it and it didn't work. I've fixed it another way.
It does work, you may have had loop set to false or an incorrect bone name
why ur using an entity
for that?
What is the name of the command that teleports the player to random locations?
spreadplayers
Thx
is it possible to detect when the player has no item in hand using hasitem?
usually /testfor @a[hasitem={item=air,location=slot.weapon.mainhand}] but minecraft cant detect air as an empty slot, so I dont know how to approach
exactly the same thing happens to me
/testfor @a[hasitem={item=barrier,location=slot.weapon.mainhand,quantity=0}]
Someone can help me on My World? I make an addon to use script events in commands like
tp @a[tag=chatSend] 0 0 0 tp to everyone who sends a message
tp @a[tag=chatSend:myCustomMessage] 0 0 0 tp to everyone who sends "myCustomMessage"
Or
blockBreak
blockBreak:grass
entityFromDirectiomView:cow
blockPlace
blockPlace:dirt
Etc...
those just look like you tp them to 0 0 0
Just an example
mhm, but are you needing help with?
You won't be able to cancel messages to the chat tho
unless there's a rule. Example using a tag: "cancelChat:spawn" to cancel message starts with "spawn"
(Btw there's a tag limit on a single entity, and its 256)
not possible cancel message after use in commands blocks, unfortunately that's how it will stay
Test it
ah makes sense
I don't read it, probably solution
NBT editing, Add-on scripting & Hack client
k
Script-API can't bypass vanilla enchantment limit
Alright
Does anyone know how to use the /save command?
I uh, i don’t think that’s a command
thanks
That's been a thing for ages. I'm surprised that they even pushed it to clients
There’s like a trillion different commands that are marketplace creators only for absolutely no reason
we have access to /save on bds
Can I make .mcfunction files use / comments instead of #?
How many ticks is 1 second currently worth?
20 ticks is 1 second
certainty? I put it in "tick.json" so that it takes 1 off my scoreboard every time and I had 20 off my scoreboard and it took about 3 to 4 seconds to get everything off
Could it be the lag too?
i mean you most likely are experiencing lag or a system of yours is wrong
I said it wrong, I'm sorry
I had 100 on the scoreboard*
The scoreboard was supposed to end in 5 seconds
But this problem might just be me, I'll ignore this problem : P
Hello people! Quick question, is there a way to create a countdown and show it on the actionbar no matter where the player is? I've created a countdown with armor stands before, but for some reason it won't show if the player's too far from the armor stands that represents the timer's numbers
Use tickingarea
you have a ticking area on both the commands and armor stands location? since both things can be unloaded and a tickingarea would prevent that
When using /playanimation can you put an animation controller on it?
not exactly, use an event to add a dummy component or property and test for that in an animation controller.
Just curious because, i thought it was only just/playanimation <entity: target> <animation: string> and when i look it up on the chat commands it has this portion /playanimation <entity: target> <animation: string> [next_state: string] [blend_out_time: float] [stop_expression: string] [controller: string]
huh, never noticed that before. I've never used the command though tbh lol
Yeah, me too kinda curious. Might be useful too
might be usable when the rest of the scripting api is pushed to non-exp but until then seems like molang is better for animations
What about just using function files ? Here is an example of how to create a countdown of 3 seconds.
scoreboard objectives add countdown dummy
scoreboard players @a[scores={countdown=1..61}] remove countdown 1
title @a[scores={countdown=60}] actionbar Launching in 3..
title @a[scores={countdown=40}] actionbar Launching in 2..
title @a[scores={countdown=20}] actionbar Launching in 1..
scoreboard players @a[scores={countdown=0}] reset countdown
This function file will start the countdown for all players if you run the command /scoreboard players set @a countdown 61.
It won't work for my needs, I have a long countdown with dynamic time adding. But I'll have it in mind for future reference. Thanks!
What do you mean by dynamic time adding ?
The player can add minutes to the countdown by pressing a button
Is that infinite ?
In that case, consider adding in multiple scoreboards and show them like this:
titleraw @s actionbar {"rawtext":[{"score":{"name":"@s","objective":"min"}},{"text":":"},{"score":{"name":"@s","objective":"sec"}}]}
there is also tellraw which works the same way
you can also compare scores to run events via execute if score @s <objective_name> = "#var" <objective_name> run say test
Thanks guys! Here's the thing: I have to create 3 different countdowns for 3 different minigames I'm working on (one of 5 mins, and the other two will be 1 minute, but it can be just 1 countdown instead of 2 different ones). I have to show them on the actionbar, one at a time, with the format "Time: M:SS". To trigger this countdowns, I have different NPCs with dialogues and buttons. The buttons start the countdown and they change the dialogue of the NPC (and several other NPCs). When the timer is running, the dialogues shows a button to stop and restart the countdown (also reverting the dialogues to the first one). And finally, when the countdown ends, they countdown stop of course, then triggers a couple of titles, and changes the dialogues of the NPCs (a third dialogue for the "game over" option)
I'm doing that right now with a very complicated system that I've in another world, using armor stands with nametags between 0 and 9, and another armor stand that serves as a countdown, and showing the name of the numbered armor stand as the timer in the action bar, etc.
I assume there will be a better, more efficient and, most importantly, simpler way to achieve that
Forget about the "add minutes" function right now. First I want to know if there's a way to achieve just a "simple" countdown without all the hustle
Also, I need for the seconds to have 2 digits
yeah a timer scoreboard with a fake player should work
use seperate display scores
and use scoreboard operations to update them
execute as @a run scoreboard players operation @s second %= "10" time
execute as @a run scoreboard players operation @s second2 = @s time
execute as @a run scoreboard players operation @s second2 /= "10" time
execute as @a run scoreboard players operation @s second2 %= "6" time
execute as @a run scoreboard players operation @s minute = @s time
execute as @a run scoreboard players operation @s minute /= "60" time
execute as @a run scoreboard players operation @s minute %= "10" time``` something like this
Thanks a lot!
I know i have asked this before. but is there any way to get the data out of the /locate?
Scripting, score boards ECT... dont really care. Even TP would be fine...
Mhm, probably no.
/execute align "xyz run tp @s ~ ~0.5 ~
Would this teleport me to the center of a block or am I getting align wrong
Owh
-1.1 becomes -2 for example, it doesnt round it to the closest number.
Well thats an issue
Oh wait I think that doesnt matter for what im trying to achieve
align floors the value to the lowest corner of the block
U can combat this via positioned or similar methods
positioned?
Can I make an entity tp to the center of the block it is
Yeah, /execute align xyz run / tp <target> ~0.5 ~0.5 ~0.5
Ah thanks!!!
is there any way to stop a sound with a fading?
No.
Technically, sounds played through /music support fade-outs using /music stop <fadeSeconds>, but that's not the same as /playsound.
What is the easiest way to run a command once each time the world gets started up? This is for a world load NOT a SERVER.
Trying to do it EVERY time the world loads not just the FRIST time. Trying to figure out how to link it to ONLY the HOST player loading the world. I might have to do a combo between of first world load AND the On player join.
https://wiki.bedrock.dev/commands/on-player-join.html
You can just use a dummy entity with an ac and tick world component. The ac will switch to default every time the world loads mate 😄
☝️
ac?
sounds interesting. I need to find example.
Intro to Animation Controllers: Wiki Link
Running commands in AC: Wiki Link
Stable Documentation for Animations Bedrock.dev Link
Effects in Animations Wiki Link
Death Animations Wiki Link
Math-based Animations Wiki Link
Math animations are a powerful alternative to key-frame animations. Generally speaking, math based animations is the concept of using Molang expressions and maths to animate entity geometry.
Entity Modeling and Animation Microsoft Link
Entity with Animation Turotial Microsoft Link
Resource Pack Animations Microsoft Link
?dummy entities
Dummy entities are invisible entities which are used behind the scenes for game-play purposes.
Dummy entities are a very useful tool, and the document (linked below) covers some of the ways they are utilized, as well as showing how to set up the resource side of things.
https://wiki.bedrock.dev/entities/dummy-entities.html
Ah right, for some reason my mind was trying to figure out how to use the "fake player" like used in the on first world load example.
and I couldn't sort out how to give them an animation controller LOL
Create some objective
execute if entity @a[scores={obj=1}] run say someone joined
scoreboard players set * obj 1
scoreboard players set @a obj 0
What is this ?
It will detect if someone joined
Every time
- works on every target with score
Even offline
I'm trying to quickly set up so a command gets run when the world loads, not on join of every player.
put it in function idk
well now I've discovered it is a moot point since the command I wanted to run is apparently not automateable it apparently is one of those commands that you HAVE to run from the chat directly.
the only command for that is really just /kick
What is the difference between the as and at components of the execute command?
as is basically saying that this target is executing this command.
at is saying execute this command at those coordinates.
e.g. /execute as @a run say @s would make all the players say their name but using /execute as @a run setblock ~ ~ ~ planks would set every block to 0 0 0 because at was not specified
I think
Thanks
yeah also important to note at also grabs the rotation of the entity
what is wrong with these commands? vscode seems to think something is wrong with the fill command?
execute as @s[tag=nether] run fill ~10 ~4 ~10 ~-10 ~-4 ~-10 air replace minecraft:obsidian```
as far as I can tell there is nothing wrong with these, they seem to work in game when pasting them into the chat just fine.
if they work fine ingame vscode is just lying to you
Can we combine the use of ~ and ^ in a command?
Yes, however not in the same piece of syntax, for instance u can’t say;
/tp ~5 ^ ^5
Ah so an execute command with positioned would be the way to go I see
Exactly, yeah
Some tricks to protect my spawn with commands?
You could set an execute as @a[select for volume around your spawn location] run gamemode @s adventure or something like that. But then you also need some way to change gamemode back when they leave the spawn area.
Guys, is there any way to target all kinds of food with a /kill @e[type=item] command?
Or at least a way to kill several different kinds of edibles with few commands
Not really
Please just place deny blocks below the spawn.
Hehehe if i did that the players can't build they shops
Why would you want the player to build their shops in spawn ?
So I just have to use a command for each food type?
bruh
but it's the spawn
u want people build in the spawn?
No
that's why he is saying to put deny block
u put the block under the spawn only
you need to be more specific first you say you want people to be able to build shops at spawn and now they shouldnt build at spawn at all
"minecraft:damage_sensor":{
"triggers":[
{ //if you already have a damage sensor, simply copy this object into the "triggers" array
"on_damage":{
"filters":{
"any_of":[
{
"all_of":[
{ "test":"has_tag", "value":"nopvp" }, //does the player have this tag?
{ "test":"has_tag", "subject":"other", "value":"nopvp" } //if so, does the entity they're trying to hurt have this tag?
]
}
]
}
},
"deals_damage":false //if any of these filters evaluate to true in the current attack interaction, the target will not be hurt.
}
]
}```
Use this damage sensor in behavior_pack/entities/player.json, and use repeating commands to tag players within some area with nopvp and un-tag players outside of that area
tag @a[tag=!nopvp,x=~,y=~,z=~,r=50] add nopvp
tag @a[tag=nopvp,x=~,y=~,z=~,rm=50] remove nopvp```
@upper swift
you could also just apply weakness instead of using a damage sensor
there might be a better way to do this, but this was what first came to mind ^^
If you have a sword with sharpness above 12 or something like that weakness will no longer work though. I recommend using that damage sensor
/execute @a[tag=test] ~ ~ ~ function test Where is theu mistake?
what's ur min engine version?
probably u need the new syntax
"format_version": "1.17.0",
"minecraft:recipe": {
"description": {
"identifier": "myaddon:craft_my_item"`
},
"result": {
"item": "minecraft:diamond_sword",
"count": 1
},|
"ingredients": [
{
"item": "minecraft:diamond",
"count": 1
}
],
"priority": 1,
"exp": 5,
"minecraft:crafting_shaped": {
"pattern": [
" D ",
" D ",
" S "
],
"key": {
"D": {
"item": "minecraft:diamond"
},
"S": {
"item": "minecraft:stick"
}
}
},
"minecraft:on_crafted": [
{
"function": "myaddon:first_time_item_craft"
}
]
}
}```
Is there any error in this code?
Doesn't seem like a command question to me
You're asking for json, I was going to ask if it was correct or not, it's in the wrong place LOL
How can I give myself or setblock a chest with name just "§a"? For testing a plugins i made
You could rename one in an anvil, place it, save it as a structure then load it wherever needed @mighty rune
how can I round up entity rotation to closest 0/90/180/270/360 degrees?
So when I run the command it only faces exactly north/south/east/west depending on the facing of the entity?
What are you trying to create though ?
Fake block with exact rotations
the animations I now have are animation wise
You can use q.head_y_rotation to check for the current rotation of the entity and rotate it accordingly.
-query.body_y_rotation+(math.round(query.body_y_rotation/90)*90)
In a command? Or should I run this from an AC?
You should run it from an animation
here it is from a command:
execute if entity @s[rym=-45,ry=45] run tp ~~~ 0
execute if entity @s[rym=46,ry=135] run tp ~~~ 90
execute if entity @s[rym=-180,ry=-136] run tp ~~~ 180
execute if entity @s[rym=136,ry=180] run tp ~~~ 180
execute if entity @s[rym=-135,ry=-46] run tp ~~~ -90
best to have both though
Does this have inconsistency's?
remember that rotation in a server-side entity is from -180->180
no
it is what I use to create fake blocks
So it wont return for example 89 degrees?
no
Thats great thanks!
if the player is on the given cords and does not have the kk tag, it teleports him to x=1,y=1,z=1. How to write this as a command?
I've already made it
/execute as @a[x=-9642,y=78,z=-9945,r=1.7] at @s[tag=!www] run tp @s ~ ~ ~-2
that looks correct? maybe I'm wrong?
works in mc
Hey guys! Quick question. How can I write two-word names inside a @e[name=X] selector?
name="X Y"
Yeah, it didn't worked because I changed the NPC name in the UI, not with the summon command
Thanks!
I need some help creating a minigame for a world I'm working on. I have a pressure plate connected to a dispenser that contains different types of food. Vegetables, fruits, meat, and a golden apple. Each time the player steps on the pressure plate, a random food will drop from the dispenser. What I want to do is to assign each type of food a point value to create a final score at the end of the minigame, which will last about a minute or two. Fruits and veggies are one point, meats are two points, and the apple is five points. The thing is, I'm not exactly sure how to identify which foods are falling from the dispenser each time and I how to assign a single point to a dispenser when that fruit drops. Since using the /testfor command will identify the food, but then it'll assign points while it's there on the ground. I had some thoughts on this, and maybe adding a /kill command will work, but I that will make the food practically invisible tho the player. Also I think that if the player picks up the food, it will be much easier to detect the food in their inventory and then assign a point. But since the dispenser drops the food vertically, and the pressure plate is a couple of blocks away, so the player has to step on the pressure plate, then walk to the dispenser, pick up the food, and then go back to the pressure plate, which is not the effect I want to show. The idea is for the player to have to press the pressure plate to get the dispenser to drop food as quickly as possible. Do you have any ideas on how I can solve this dilemma?
Is is mandatory for your mini game to need to use a pressure plate and dispenser?
Yes
Because it's teaching about the Heimlich manouver
So the player needs to "apply preassure" on something, and the dispenser works as a "spitter" of sorts
Do you know if I can summon an entity with a two-word name tag?
/summon armor_stand "X Y" ~~~
Thanks!
Button... Not sure pressure plate is idea... not sure if you can jump on it to keep pressing it. Also as you process the food for points, also tag it so that you do not process it again, while it is floating. There is also the chance that the player can drop the food to get points so make sure the area where points are gather is exact... or make a way they cannot stand there and drop stuff. ( like dispenser is up higher and processing area is a block below)
The way I think I'm going to handle it is, as you said, tagging the food and then tp them to a different area that I'm creating that will be a "display" separated by food category. So the player cannot pick it any way
No, you can't jump on the same block and re-activate the preassure plate, I've tested it. You need to move to one side and then jump from there
But I have two main reasons for not using buttons:
- First, I already have a minigame nearby where you have to press buttons based on a rythm, so I want to change the action for this one
- Second, since the narrative is about applying pressure on the chest of a person (made by blocks in this case), it made sense to "jump" on a pressure plate that's located in the chest of that body made of blocks
do you know any scary playsound?
The ghast scream can be scary if it's a jumpscare
Combine multiple ambient sounds
Chicken sounds
Just mess with the pitch of random sounds
@fallow cliff I want your player to throw tp in the direction he looked, can you tell me a command?
/execute as @a at @s run tp @s ^^^7
Tp 7 blocks forward in the direction the player was looking
thanks
Guys, quick question, what's the selector I have to use to target different types of food?
If you're talking about the food item on the ground @e[type=item,name="cooked chicken"]
I th ink it is case sensitive, so case it right... if you are ever unsure.... throw one on the ground, backup and do a testfor for stuff close to you and you will get the floating-name
It's not case-sensitive
is there a way to summon an entity with a particular skin varriant?
If it's a custom entity, you can use a spawn event that changes the varient.
What if it is an NPC?
No. Not with only commands at least.
Can you please give me an example for the summon command syntax with the event on it?
You beat me for a few hours 😅
That's exactly what I needed. Thanks!
/summon <namespace:entity_id> ~ ~ ~ ~ ~ <spawnEvent> <nameTag>
can someone tell me how to run command that give slowness to entity's when players are not in a radius of 5
r=-5
effect @e[r=-5,type=!player] slowness 1 255
@spare sinew
rm=5
Oh yeah that exists
ayo does negative radius work? that's sick
what's the sense of negative radius
Everything outside of the radius
what is the difference between rm and negative r?
rm is the maximum radius, negative r is anything outside the radius
Nope.
Rm is minimum radius, while r is maximum
I don’t even think it accepts negatives?
testfor @a[rm=2,r=20] would find a player at least two blocks away and within 20
If r=- does work then maybe it’s the same as rm? Dunno
/execute unless entity @e [type=player, r=5] run effect @e [r=5] slowness 1 255 true
Yeah, I remember it being case sensitive at one point. But not anymore it seems.
I used to do the same thing sometimes when I needed to get the item name 👀
ohh, very interesting
Could someone help me, I would like the particle to be located right at the coordinate where the player has a vanilla sword.
execute @e[hasitem={item=nt:void_sword,location=slot.weapon.mainhand}] ~~~ particle nt:void_spear ~~1~
is there is a list of animation that can be used on the player with /animation command (ping me)
execute as @a at @s if block ~ ~-1 ~ minecraft:water run fill ~ ~-1 ~ ~ ~-1 ~ minecraft:ice
@fallow cliff the command correct?
Hey guys! Is it possible to use rawtext and translate to name the entity in a /summon command?
This one is not working:
summon pix:human -34 70 285 ~~ pix:skin_25 { "rawtext": [{ "translate": "dialogue.npc_name.alejandro"}] }
Hello, can someone help me?
I want a function that when I use it, it will dash the player 3 blocks forward.
Yes
@fallow cliff how do i do this.
/tp @s ^^^3
@fallow cliff I don't want that, instead of TP, I want the player to be there fast, that is, dash. Is there a Function for this?
/scoreboard players set @s dash 30
Repeat
/execute as @a [scores={dash=1..}] at @s run tp @s ^^^0.1
/scoreboard players remove @a [scores={dash=1..}] dash 1
Speed is 0.1 block per tick
Ok thank you, I will try it and let you know.@fallow cliff
I might take time to respond though
no problems
@fallow cliff The command gave an error, what do you think is the problem?
execute as @s[scores={dash1..}] at @s run tp @s ^^^0.1
scoreboard players remove @a[scores={dash1..}] dash 1```
dash=1..
@fallow cliff I'm sorry, I took your time, it's all my property.
@still phoenix going back to this one, the item tagging inside a command is not case-sensitive, but it is "language" sensitive
If I use this command: /execute if entity @e[type=item,name="apple"] run say hi, I have to have Minecraft set in English for it to work
If I change it to Spanish, for instance (since it's my native language), I have to change the word "apple" to "manzana"
@fallow cliff
scoreboard objectives add events dummy
scoreboard players set 1s ticks 100
scoreboard players add timer ticks 1
scoreboard players operation * events = timer ticks
scoreboard players operation chatMessage events %= 1s ticks
execute if score test events matches 0 run say 1```
Did I write the command correctly?
1s is 20 not 100
Player-name to which remainder was applied and player-name being tested are different
- chatMessage
- test
@fallow cliff I couldn't understand, it's okay if you just do it and throw it away, sweetie.
idk what you need exactly...
And don't call me "sweetie" or such, I don't even know you
Here... idk if this is what you want
scoreboard objectives add ticks dummy
scoreboard objectives add events dummy
scoreboard players set 1s ticks 20
scoreboard players add timer ticks 1
scoreboard players operation * events = timer ticks
scoreboard players operation test events %= 1s ticks
execute if score test events matches 0 run say 1
Google Translate
@fallow cliff It will count up to 30 times and after the counting is completed, a message will appear saying "finished".
Let it count as 30 messages, without being seen, and then just say "done".
Setup multiple commands
Or you could use scripting
Yes, I'm using multiple commands since I don't know a thing about scripting. But I never thought that the language would be a thing when targeting a vanilla food
You can save it on structure block renamed and replace when detect it
Since I got lots of items but only a few different kind of foods, it's faster to just do one command for each language. But that'll a good solution if I had less items
whats the playanimation when just hitting a mob or mining a block?
im trying to run a command specifically for that
Trigger:
/scoreboard players set done timer 600- 600t = 30s
System:
/execute if score done timer matches 1.. run scoreboard players remove done timer 1
/execute if score done timer matches 0 run say done!
/execute if score done timer matches 0 run scoreboard players set done timer -1
The animation activates based off of variables and queries
In other words, it only activate when u ac hit in the first place, so unless ur looking to exacerbate the hitting animation on the player, or to reconstruct their animations from a foundation, I’m not too sure why ud need this
Hmm, very complex. I'm guessing it can't be possible.
U can try emulate a similar visual effect with other animations, however trying to force that punch animation is not - no
@fallow cliff Can you tell me a system that will add 5 points every second and stop at 100 at the end?
When the player used a power, it will be 80, then it will stop at 100 for 1 second, 5 points, for example like this
https://wiki.bedrock.dev/commands/scoreboard-timers.html
Refer to this page
execute at @a run summon chicken ^ ^ ^3.5
thanks
i want to run an event instead
Please clarify
okay so /execute facing ^ ^ ^3 run event entity @e[r=2] test:test
something like thsi
So you want to execute an event on the closest chicken infront of the player?
execute at @a positioned ^^^3.5 run event entity @e[type=chicken,r=2,c=1] test:test
thanks
/execute at @s positioned ^ ^ ^3 run event entity @e[c=1,r=3,family=chicken] test:test
i tried doing this in the addon but it failed to run
in world it works
In which context are you running it?
animation controllers
on_exit
and on_entry
i swear they work animation controller but only command doesnt
Send your animation controller
kk
"controller.animation.chickentest":{
"initial_state": "setup",
"states": {
"setup": {
"transitions": [
{
"open": "q.variant == 1"
}
]
},
"open": {
"on_entry": [
"/execute as @s positioned ^ ^ ^3 run event entity @e[c=1,r=3,family=chicken] test:test"
],
"transitions": [
{
"setup": "q.variant == 0"
}
],
"on_exit": [
"/execute as @s positioned ^ ^ ^3 run event entity @e[c=1,r=3,family=chicken] test:no_test"
]
}
}
What entity is this ran from?
player
Try it with a debug command
Wait
What is your min_engine_version?
1.17
It needs to be 1.19.50 or higher
thanks
hey anyone there?
titleraw @a title {"rawtext":[{"text":"\n\n\n\n\n§a ● §r§dName§r : §a"},{"selector":"*"},{"text":"\n ● §dBalance§r : §a"},{"score":{"name":"*","objective":"money"}},{"text":"\n ● §dBank§r : §a"},{"score":{"name":"*","objective":"bank"},{"text":"\n\n\n"}}}]}
it's not working
@mystic apex
Np
How could I make it where it shows my kills and etc in this json file
/titleraw @a title {"rawtext":[{"text":"§r---------------\n"},{"text":"§aPlayer: ","extra":[{"selector":"@s"}]},{"text":"\n"},{"text":"§2Money:§a","extra":[{"score":{"name":"@s","objective":"money"}}]},{"text":"\n§r---------------\n\n"},{"text":"§3Kills:","extra":[{"score":{"name":"@s","objective":"kills"}}]},{"text":"\n"},{"text":"§4Deaths:","extra":[{"score":{"name":"@s","objective":"deaths"}}]},{"text":"\n"},{"text":"§cKillstreaks:","extra":[{"score":{"name":"@s","objective":"killstreaks"}}]},{"text":"\n\n"},{"text":"§eAdvanced "},{"text":"§cNetwork\n\n"},{"text":"§r---------------\n"}]}
```?
wow
Idk how you got that so wrong bro
chatgpt lol. But i fixed it anyway by myself
@mystic apex What colors should I use for my personal scoreboard?
Idk
how do you make it so that the block doesnt drop it self when destroyed with the /setblock command
just dont use the destroy component
/setblock ~~-1 ~ air wouldnt drop the block
i know but i need the particle effect hide the lag but it's alright i've found a solution
how can I turn dz relative to entity rotation? I want to detect entities in a line in front of my entity
is there anyway to exclude yourself from this @a execute if entity @a[scores={plot1=1..1000}]
rm=0.001 or something like that
ty bro got it sorted
Mcfunction example @heavy holly
tag @s add temp1
Execute if entity @a[scores={plot1=1..1000}, tag=!temp1]…
tag @s remove temp1
Guys any one knows how to re enable achievements after adding behaviour pack
World NBT editor
is there a way to generate colored firework?
Question: How would I check for a specific block in an large area. execute if blocks doesn't ask for a block to check for. Just if there are blocks. And the if block only checks 1 cord. How do I check large areas for a block? (in Stable, no api)
No. Not with commands.
So I'd make a execute if block "block name" for each cord around me. Is the ~~~ for a grid already done somewhere I can just copy paste them?
Did I miss any?
I don't see any missing
how do i summon a splash potion with an effect
Save it in a structure
…and how am i supposed to do that while a potion is f a l l i n g
Set a repeating command block to teleport the potion entity to itself
Great news. I added it here for other to use if they need a grid
For fake players, when Added to the list can we add images to those?
U can add custom icons via a texture pack which can be used in said score’s display name
Oh bet, do you happen to have an example
Unfortunately not; it’s a little outa my expertise so I’m defo not the person to talk to, but u can fs find some good videos online if u look up smt along the lines of ‘how to make custom font MCPE’ or smt like that
They’ll essentially explain how to make a sheet with images on; u just wanna break up wtv image u wanna put in ur title into little segments that fit inside the tiles
I think they’re typically smt like 8x8 pixels - no clue
this is the neededXp = levels one
