Entity Documentation - minecraft:is_charged
minecraft:is_charged
sets that the entity is charged.
Important
minecraft:is_charged
is a Boolean that is used to set the value for use in query functions like Molang and Filters. In order for the entity to have the desired affect, it will need to be paired with extra functionality.
The examples below will showcase both the property and how it works to create the desired effect on the entity.
Example
Plain
"minecraft:is_charged":{
}
With Functionality
// Set up a behavior that will trigger the charge state.
"minecraft:target_nearby_sensor": {
"inside_range": 2.5,
"outside_range": 10.0,
"must_see": true,
"on_inside_range": {
"event": "minecraft:power_up",
"target": "self"
}
}
// Set up custom event to tag that it is now charged
"minecraft:power_up":{
"minecraft:is_charged":{
}
}
Note
If the Entity will have the ability to toggle between the two states, you can define the property in a Component Group and use the add
and remove
capabilities to act as a toggle based on Events.
Vanilla entities examples
creeper
"minecraft:is_charged": {
}
Vanilla entities using minecraft:is_charged
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for