Skip to content

Using adjustDisplays

Jay edited this page Aug 9, 2025 · 2 revisions

Warning

  • DO NOT perform adjustDisplays testing on players. Use mobs (preferably a Zombie) ONLY
  • The groups/controllers can be used on players outside of testing

Note

Entity → Zombie

Goal → Keep the hat visibly attached to, and aligned with, the zombie's head

Requirement: A follow property (default or part) with its followType set to PITCH_AND_YAW or PITCH

image

adjustDisplays DISABLED

  • Using /mdis group ride -target <controller-id> we can view how the group will look without any adjustments

  • Zombie at 0 pitch

image
  • Zombie at 45 pitch
image
  • When the zombie's pitch changes, the cap does not move to a desirable position and isn't properly positioned on the zombie's head

ENABLING adjustDisplays

image
  • Both adjustment percentages determine how strong the adjustment should deviate from the default behavior

    • The yDisplayAdjustPercentage determines the local vertical offset percentage (How far the cap from the top of the zombie's head)
    • The zDisplayAdjustPercentage determines the local horizontal offset percentage (How far forward/backward the cap is)
    • This system is in place due to the varying shapes and sizes of models and there isn't a way to always know what values should be input.
    • It takes trial and error to find the best fitting values

Caution

  • The group must be dismounted with /mdis group safedismount before reloading your controller
  • Place the group back on the entity with /mdis group ride -target <controller-id>
  • Trying different values on zDisplayAdjustPercentage

    • The yDisplayAdjustPercentage appears fine so it can stay at 100.

    • Only the zDisplayAdjustPercentage's value will be changed

    • A value of 50 increases the problem at pitch 45 so instead a number above 100 should be used

      image
    • A value of 150 lessens the issue at pitch 45 and seems perfect at pitch 90

      image image
    • A value of 162.5 isn't too bad for both pitch 45 and pitch 90

      image image
    • A value of 175 is almost perfect at pitch 45 but doesn't look too good at pitch 90.

      image image
    • A value of 162.5 seems like the best choice.

groupProperties and defaultFollowProperties used for this example

groupProperties:
  flip: false
  verticalOffset: -0.5
  visibleByDefault: true

defaultFollowProperties:
  followType: PITCH_AND_YAW

  deathDespawnDelay: 0

  teleportationDuration: 2

  pivotInteractions: false

  adjustDisplays:
    enabled: true
    yDisplayAdjustPercentage: 100
    zDisplayAdjustPercentage: 162.5

  stateFilter:
    states: []
    blacklist: true

DisplayEntityUtils Wiki

Overview

General Help / Examples

Display Groups

Interaction Entities

Animations

Animation Effects (w/ Frame Points)

DisplayControllers (Mounting, Custom Entities & Equipment)

Skript Help / Examples

API Help / Examples

Old Help / Examples

Clone this wiki locally