minecraft:reflect_projectiles for you with a switch.Get GodCraftOverview
minecraft:reflect_projectiles is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Lets the entity bounce incoming projectiles away instead of being hit by them. This is an experimental feature.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
azimuth_angle | Molang | "0" | Molang expression for degrees added to the projectile's left-right direction when reflected. |
elevation_angle | Molang | "0" | Molang expression for degrees added to the projectile's up-down direction when reflected. |
reflected_projectiles | Array | none | Projectile types that bounce off this entity. |
reflection_scale | Molang | "1" | Molang expression that scales the bounced projectile's speed; below 1 slows it, above 1 speeds it up. |
reflection_sound | String | "reflect" | Sound event played when a projectile bounces off. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:reflect_projectiles": {
"azimuth_angle": "0",
"elevation_angle": "0",
"reflected_projectiles": {},
"reflection_scale": "1",
"reflection_sound": "reflect"
}
}