Skip to content

Fix data component conversion in CraftEntity throwing a ClassCastException#14099

Open
TheZexquex wants to merge 2 commits into
PaperMC:mainfrom
TheZexquex:fix/get-data-on-entities
Open

Fix data component conversion in CraftEntity throwing a ClassCastException#14099
TheZexquex wants to merge 2 commits into
PaperMC:mainfrom
TheZexquex:fix/get-data-on-entities

Conversation

@TheZexquex

Copy link
Copy Markdown

This fixes wrong crasting in CraftEntity for data components. Closes Issue #14090

@TheZexquex
TheZexquex requested a review from a team as a code owner July 24, 2026 14:29
@github-project-automation github-project-automation Bot moved this to Awaiting review in Paper PR Queue Jul 24, 2026
@masmc05

masmc05 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

There's no reason to use FQN in .java files, those are used only in .patch files to avoid extra diff from imports (other FQN are from pre-hardfork)

}

public static <B, M> @Nullable B convertDataComponentValue(final DataComponentMap map, final PaperDataComponentType.ValuedImpl<B, M> type) {
public static <B, M> @Nullable B convertDataComponentValue(final net.minecraft.core.component.DataComponentGetter getter, final PaperDataComponentType.ValuedImpl<B, M> type) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this not just be imported or was there a conflict?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it can be imported, I just used the fqn because I used it in CraftEntity (where I used it because it was done everywhere else), I'll change it real quick

@papermc-projects papermc-projects Bot moved this from Awaiting review to Full approval in Paper PR Queue Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Full approval

Development

Successfully merging this pull request may close these issues.

4 participants