1. Wiki
  2. /Entities
  3. /minecraft:movement.sway

minecraft:movement.sway

Don't want to write this by hand? GodCraft sets minecraft:movement.sway for you with a switch.Get GodCraft

Overview

minecraft:movement.sway is an entity component: it goes in the components object of a custom mob, or in one of its component groups. A move style that wiggles the mob from side to side so it looks like it is swimming, as fish do.

Fields

FieldTypeDefaultDescription
max_turnDecimal"30.0"How many degrees the mob can turn in one tick. Lower values give smoother, slower turns.
sway_amplitudeDecimal"0.05"How wide the side-to-side wiggle is.
sway_frequencyDecimal"0.5"How fast the wiggle repeats; higher means quicker swaying.

Example

Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):

BP/entities/<name>.json
{
  "minecraft:movement.sway": {
    "max_turn": "30.0",
    "sway_amplitude": "0.05",
    "sway_frequency": "0.5"
  }
}

We use cookies to improve your experience and analyse site traffic. Learn more