Skip to content

feat: add NPC scale support for Minecraft 1.20.5+#218

Closed
KevinDavai wants to merge 1 commit intoPyrbu:2.Xfrom
KevinDavai:2.X
Closed

feat: add NPC scale support for Minecraft 1.20.5+#218
KevinDavai wants to merge 1 commit intoPyrbu:2.Xfrom
KevinDavai:2.X

Conversation

@KevinDavai
Copy link

  • Registered new AttributeProperty "scale" in EntityPropertyRegistryImpl
  • Only active for versions 1.20.5 and above

@D3v1s0m
Copy link
Collaborator

D3v1s0m commented Jan 11, 2026

@KevinDavai Simply adding the property isn’t sufficient. The look system also needs to be updated to account for scale when computing the target yaw and pitch for the NPC to face the player. I’ve tried adjusting this within the current setup, but it doesn’t behave correctly. To fix this properly, the look behavior needs to be reworked on the backend so scale is consistently factored into the calculations. I'll try to work on it today.

@Pyrbu
Copy link
Owner

Pyrbu commented Feb 25, 2026

I think we should accept this and just forget about look breaking with it for now because it adds a lot of creative possibilities with the plugin.

@D3v1s0m
Copy link
Collaborator

D3v1s0m commented Feb 25, 2026

Give me 1 day. I will try to reimplement the look logic with scale support once more. If it doesn't work, I will add it directly.

@Pyrbu
Copy link
Owner

Pyrbu commented Feb 25, 2026

To implement it you will need to generate a height value for every possible entity type and subtract that value multiplied by the scale value from the y coordinate in the look calculation.

@D3v1s0m
Copy link
Collaborator

D3v1s0m commented Feb 27, 2026

Implemented in a41bd3d, available in build #259
Adds NPC scale support via the attribute_scale property (Minecraft 1.20.5+).
Now, it also accounts for scaled players, targeting the player’s eye Y position instead of their feet Y position.

@D3v1s0m D3v1s0m closed this Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants