Configuration
Server configuration
What a server decides for the players who join it, and how it reaches them.
Mo’ Bends animation runs entirely on each player’s computer, so a server doesn’t need the mod to let its players see animations. Installing it on the server lets the server set the rules for what players’ resource packs may do to animation.
Why there are rules
Animation can come from anyone’s resource pack: an extension, a replacement animator, a custom model. Most packs are harmless, but a pack could draw a player far from where their hitbox is, or give them giant or invisible geometry, which is an advantage in PvP. So the server decides how much freedom resource packs get, and tells every player with Mo’ Bends when they join.
The config file
On a dedicated server the options live in the server’s config/mobends.cfg, in the Server
category. The file and its defaults are written the first time the server starts.
Server {
# What players' resource packs may do to Mo' Bends animation (types, extensions, animators, clips):
# ALLOW (anything), LIMITED (their offsets and scales stay close to the trusted animation's, and their custom
# model geometry is refused) or DENY (they are ignored). Mods and the server's own resource pack are
# always trusted.
S:resourcePackAnimation=LIMITED
# LIMITED only: how far (in model units, 1/16 block) resource packs' animation may move any single
# part of a model from where the trusted animation puts it.
D:maxPartOffset=4.0
# LIMITED only: how far (in model units, 1/16 block) resource packs' animation may move a whole model
# from where the trusted animation puts it.
D:maxBodyOffset=16.0
# LIMITED only: by what factor, at most (up or down, per axis), resource packs' animation may scale
# any single part from the scale the trusted animation gives it. 1 forbids scaling.
D:maxPartScale=1.5
}
Restart the server after editing the file.
| Option | Default | What it does |
|---|---|---|
resourcePackAnimation |
LIMITED |
ALLOW, LIMITED or DENY (below). Case-insensitive; anything else is read as LIMITED |
maxPartOffset |
4 |
With LIMITED: how far resource-pack animation may move a single part (an arm, the head) from where the regular animation puts it, in model units (1/16 of a block). Negative values count as 0 |
maxBodyOffset |
16 |
With LIMITED: the same for the whole model |
maxPartScale |
1.5 |
With LIMITED: by what factor, at most, resource-pack animation may scale a single part, up or down on each axis, from the scale the regular animation gives it. 1 forbids scaling; less counts as 1 |
Trusted and untrusted content
| Trusted | Untrusted |
|---|---|
| Mo’ Bends itself, other mods, vanilla, the server’s own resource pack, and resource packs signed by Mo’ Bends (such as the Legacy Mo’ Bends pack) | Any resource pack the player enabled, including a pack’s replacement of a trusted file (an animator, a clip or a model it overrides) |
The rules only ever apply to untrusted content. To ship custom animation that everyone gets unrestricted, put it in the server resource pack.
Policies
ALLOW
No limits: resource packs animate as freely as mods. Singleplayer always behaves this way, whatever its config says.
LIMITED (default)
Resource packs’ types, extensions, animators and clips work, within limits:
- After the regular (trusted) animation has posed the model, Mo’ Bends notes where every part is.
After the resource packs’ layers, each part’s offset is brought back to within
maxPartOffsetof that, and the whole model’s offsets to withinmaxBodyOffset. An extension can move a swimming player’s arm a little, but not the whole swim. - Each part’s scale is held within a factor of
maxPartScaleof the regular one, so a pack can’t hide a part or blow it up. - Rotations are free. Parts can turn any way; they just can’t be moved away.
- Broken values (infinite or not-a-number offsets and rotations) are dropped, so no part can be made to vanish.
- Custom models are refused. A model definition (custom geometry) from a resource pack is ignored, along with any type that uses one, and a pack’s version of a built-in model is skipped for the original.
DENY
Resource packs’ types and extensions are ignored, and for every animator, clip and model the trusted version is used. Players see exactly the animation that comes with Mo’ Bends and your mods.
How players get the rules
- A player joins the world. Until the server answers, their game uses the defaults (
LIMITED, 4, 16). - Their game asks the server for its rules, and the server sends its
Serversettings back. - If the policy is different from what the animation was loaded under, the player’s animations reload. The two limits are read every frame and take effect without a reload.
The rules apply until the player leaves. They are not saved on the client.
A server without Mo’ Bends never answers, so its players keep the defaults: resource packs
are limited, not allowed. Install Mo’ Bends on the server and set ALLOW if you want to give
them free rein.