Uploaded January 2022 | Updated September 2026, 2 weeks ago
Hey everyone, Estrongel here and I wanted to start making add-on tutorials because I've noticed a lack of them. I get starting with environment sensors is a weird one, because it is. I just picked it randomly. Anyways, this should give a good overview of them, and I plan to do more videos showcasing each individual filter with some more use cases. If you have any questions or feedback, let me know in the comments.
0:00 Environment Sensor Overview
0:40 Both Syntax Forms
1:30 Grouping Filters
1:50 Examples Overview
2:20 all_of Example
5:00 any_of Example
6:12 none_of Example
7:35 Nested Grouping
9:34 Outro
SOOBISCRIBKE!
Bedrock.dev filters documentation: https://bedrock.dev/docs/stable/Entities#Filters
Environment Sensor Examples Json:
mediafire.com/file/pt0kq68dinyltuf/environment_sensor_examples.json/file
Join my discord server: discord.gg/BNSHWCR9jG
//MY SCRIPT//
Hey everyone, Estrongel here and welcome to my Environment sensors basics guide. Environment sensors allow you to run events on an entity based on specific filters and are a useful way to run some comparisons without the need for animation controllers. Knowing every filter isn’t necessary since there are quick reference sites that can be used, but knowing the general syntax for them and different applications that can be used to run specific events will be beneficial when working with any add-on project. I have left a link to bedrock.dev that shows a list of all current filter documentation in the description for you to look at if you’re interested.
To start with, there are two forms of syntax that you can use with environment sensors. The first of these is where the “triggers” section has a curly bracket after the colon. With this syntax, we are only able to create a single trigger to an event. The second form of syntax uses a bracket after the colon, with curly brackets surrounding each trigger. With this syntax form, we can think of triggers as an array, with filters leading to multiple events. For the purpose of this guide, we will be using these types of triggers.
Also, if at any point you find I am going too fast, I’ve left a download link for the tutorial file I’m using, and the script that I used for this video in the description. I also have timestamps placed at each point if you need to jump to a specific section.
Inside of triggers we can also group filters to narrow down the situations we are searching for. We can do this using “all_of”, “any_of” or “none_of” as conditions. You can look at all_of as being equivalent to AND conditions, any_of equivalent to OR conditions, and none_of as a NOT condition.
Now that we know what the syntax looks like, let's do some tests with these three grouping methods. The filters that we will be using for our tests are going to be has_biome_tag, and has_equipment filters and we will run an event “give_slowness” which will apply a slowness effect to a player when certain conditions are met. Has_biome_tag allows us to test what biome the player or entity is in, and has_equipment will let us test for an entity wearing any piece of armor in every slot, including the hand.
If we look inside of player.json, we’ll find that we actually need to modify the format to account for multiple filters. To do this we will be changing the curly bracket in the front and end of triggers to brackets, and then add curly brackets inside of the brackets. If you are using VS Code you can then right-click the document and press the format button so that it looks neat again.
=== At this point I decided to freestyle the rest of the video. thank you.
Hey everyone, Estrongel here and I wanted to start making add-on tutorials because I've noticed a lack of them. I get starting with environment sensors is a weird one, because it is. I just picked it randomly. Anyways, this should give a good overview of them, and I plan to do more videos showcasing each individual filter with some more use cases. If you have any questions or feedback, let me know in the comments.
0:00 Environment Sensor Overview
0:40 Both Syntax Forms
1:30 Grouping Filters
1:50 Examples Overview
2:20 all_of Example
5:00 any_of Example
6:12 none_of Example
7:35 Nested Grouping
9:34 Outro
SOOBISCRIBKE!
Bedrock.dev filters documentation: https://bedrock.dev/docs/stable/Entities#Filters
Environment Sensor Examples Json:
mediafire.com/file/pt0kq68dinyltuf/environment_sensor_examples.json/file
Join my discord server: discord.gg/BNSHWCR9jG
//MY SCRIPT//
Hey everyone, Estrongel here and welcome to my Environment sensors basics guide. Environment sensors allow you to run events on an entity based on specific filters and are a useful way to run some comparisons without the need for animation controllers. Knowing every filter isn’t necessary since there are quick reference sites that can be used, but knowing the general syntax for them and different applications that can be used to run specific events will be beneficial when working with any add-on project. I have left a link to bedrock.dev that shows a list of all current filter documentation in the description for you to look at if you’re interested.
To start with, there are two forms of syntax that you can use with environment sensors. The first of these is where the “triggers” section has a curly bracket after the colon. With this syntax, we are only able to create a single trigger to an event. The second form of syntax uses a bracket after the colon, with curly brackets surrounding each trigger. With this syntax form, we can think of triggers as an array, with filters leading to multiple events. For the purpose of this guide, we will be using these types of triggers.
Also, if at any point you find I am going too fast, I’ve left a download link for the tutorial file I’m using, and the script that I used for this video in the description. I also have timestamps placed at each point if you need to jump to a specific section.
Inside of triggers we can also group filters to narrow down the situations we are searching for. We can do this using “all_of”, “any_of” or “none_of” as conditions. You can look at all_of as being equivalent to AND conditions, any_of equivalent to OR conditions, and none_of as a NOT condition.
Now that we know what the syntax looks like, let's do some tests with these three grouping methods. The filters that we will be using for our tests are going to be has_biome_tag, and has_equipment filters and we will run an event “give_slowness” which will apply a slowness effect to a player when certain conditions are met. Has_biome_tag allows us to test what biome the player or entity is in, and has_equipment will let us test for an entity wearing any piece of armor in every slot, including the hand.
If we look inside of player.json, we’ll find that we actually need to modify the format to account for multiple filters. To do this we will be changing the curly bracket in the front and end of triggers to brackets, and then add curly brackets inside of the brackets. If you are using VS Code you can then right-click the document and press the format button so that it looks neat again.
=== At this point I decided to freestyle the rest of the video. thank you.










