Skip to content

fix(attributes): extract default attributes from DefaultAttributes#44

Open
MarkPLacer wants to merge 2 commits intoPumpkin-MC:masterfrom
MarkPLacer:fix-player-attributes
Open

fix(attributes): extract default attributes from DefaultAttributes#44
MarkPLacer wants to merge 2 commits intoPumpkin-MC:masterfrom
MarkPLacer:fix-player-attributes

Conversation

@MarkPLacer
Copy link
Copy Markdown

@MarkPLacer MarkPLacer commented Apr 9, 2026

The extractor currently relies on EntityType.create() to inspect entity data. For entities like Player, create() can return null because a GameProfile is required, which causes player attributes to be skipped entirely during extraction.

This change reads default base attributes from vanilla's DefaultAttributes supplier when available, which is the actual source of truth for living entity defaults.

The extracted attributes field keeps the existing entities.json shape used downstream by Pumpkin codegen; this PR only fixes missing data for entities whose defaults are present in DefaultAttributes but whose runtime instance cannot be created here.

This is the upstream root cause behind Pumpkin-MC/Pumpkin#1990. The Pumpkin PR fixes the generated data downstream; this PR fixes the extraction step so future regenerations include player attributes correctly.

@MarkPLacer MarkPLacer force-pushed the fix-player-attributes branch from fb33c20 to 456e63e Compare April 9, 2026 20:43
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.

1 participant