minecraft:physics for you with a switch.Get GodCraftOverview
minecraft:physics is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Turns basic physics on or off for the entity: falling and bumping into things. Set has_gravity to false for floating mobs.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
has_gravity | boolean | true | If true, the entity falls when nothing holds it up. |
has_collision | boolean | true | If true, the entity bumps into blocks instead of passing through them. |
push_towards_closest_space | boolean | false | If true, an entity stuck inside a block gets nudged out into the nearest free space. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:physics": {
"has_gravity": true,
"has_collision": true,
"push_towards_closest_space": false
}
}