minecraft:pushable_by_entity

Allows an entity to be pushed by other entities.

Properties

PropertyTypeDefaultWhat it does
presetsList of object[]Defines how this entity behaves when pushed by another entity. The first preset whose "filter" conditions are met will be applied; if none match, a default configuration is used instead.
filtersObject or List of object{"AND": null, "NOT": null, "OR": null, "all": null, "all_…Conditions that must be met for this preset to be applied.
testText—The name of the test to apply.
subjectBoolean or Integer or Decimal or Text—The subject of this filter test.
operatorBoolean or Integer or Decimal or Text—The comparison to apply with 'value'.
domainBoolean or Integer or Decimal or Text—The domain the test should be performed in.
valueBoolean or Integer or Decimal or Text—The value being compared with the test.
push_modeTextnone, default, legacy_boat, legacy_minecart, ball"default"Defines the type of push vector calculation applied to the entity: - "none": The entity cannot be pushed. - "default": Standard push calculations used by most entities. - "legacy_boat": Legacy push calculations historically used by boats. Includes dampened forces and sneak-based cancellation. - "legacy_minecart": Legacy push calculations historically used by minecarts. Includes alignment-based collision handling and velocity averaging.- "ball": Push calculation resulting in a behavior similar to kicking a ball. The entity is propelled in the direction of the pusher’s movement, with force scaled by their speed.
strength_multiplierDecimal0.05Multiplier applied to the push strength. Higher values result in stronger pushes.
min_distanceDecimalmin 00.01Minimum horizontal distance between the centers of the two entities for push forces to be applied. Entities closer than this will not push each other.
max_distanceDecimalmin 0340282346638528859811704183484516925440Maximum horizontal distance between the center of the pushed entity and the collision of the pushing entity for push forces to be applied. Entities further apart than this will not push each other.
require_collision_overlapBooleantrueWhen true, entities will not push each other unless their collision boxes overlap.
push_scale_selfDecimal1Scales how much this entity pushes itself away when colliding with another entity. A value of 1.0 applies full force, 0.5 applies half.
push_scale_otherDecimal1Scales how much push force this entity applies to the other entity when colliding. A value of 1.0 applies full force, 0.5 applies half.
kick_speed_scaleDecimal2Multiplier applied to the pushing entity's movement speed to determine kick force. Only used when push_mode is "ball".
min_kick_speedDecimal0Minimum speed the the entity will be pushed back at, regardless of how slowly the pushing entity is moving. Only used when push_mode is "ball".
max_kick_speedDecimal0.5Maximum speed the entity can be pushed back at, regardless of how fast the pushing entity is moving. Only used when push_mode is "ball".
vertical_kick_multiplierDecimal0.3Multiplier for the upward force applied when the entity is pushed while on the ground. A value of 0 keeps the entity flat. Only used when push_mode is "ball".
play_soundBooleanfalseIf the "pushed_by_player" sound should be played when the entity is pushed by any other entity (despite the sound name).
play_sound_cooldown_in_secondsDecimalmin 00.2Cooldown in seconds between sounds. A lower number results in more sounds.
play_sound_impulse_thresholdDecimalmin 00.2Minimum change of velocity needed to trigger the push sound. A lower value means higher sensitivity.

Example from the game files

This is how vanilla Sulfur Cube uses it in Minecraft Bedrock 1.26.60.5:

{
  "minecraft:pushable_by_entity": {
    "presets": [
      {
        "filters": {
          "any_of": [
            {
              "test": "is_family",
              "subject": "other",
              "value": "player"
            },
            {
              "test": "is_controlling_passenger_family",
              "subject": "other",
              "value": "player"
            }
          ]
        },
        "push_mode": "ball",
        "min_distance": 0.0,
        "max_distance": 1.0,
        "require_collision_overlap": false,
        "push_scale_self": 3.0,
        "push_scale_other": 1.0,
        "kick_speed_scale": 0.3,
        "min_kick_speed": 0.0,
        "max_kick_speed": 0.5,
        "vertical_kick_multiplier": 0.3,
        "play_sound": true,
        "play_sound_impulse_threshold": 0.2,
        "play_sound_cooldown_in_seconds": 0.7
      }
    ]
  }
}

Used by 85

Vanilla entities with minecraft:pushable_by_entity in their definition:

Related components