Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DEFAULT getEntitySpawnReason for /summon #9480

Merged
merged 1 commit into from
Aug 12, 2023

Conversation

Warriorrrr
Copy link
Member

Fixes an issue where summoned entities wouldn't have the spawn reason of COMMAND, but instead defaulted to default/natural/spawner inside the Entity#load method before the command reason could be set.

@Warriorrrr Warriorrrr requested a review from a team as a code owner July 13, 2023 12:30
@Machine-Maker
Copy link
Member

Does Player#respawnEnttiyOnShoulder0 suffer from the exact same problem? The nbt loading of an entity before then adding it to the world with a custom spawn reason? I think the entity's spawn reason isn't overriden with SHOULDER_ENTITY like it should.

@Warriorrrr
Copy link
Member Author

The entity's original SpawnReason will be set so it won't be overridden with the SHOULDER_ENTITY one, I think keeping the original would be more in line with what the javadoc message says.

@lynxplay lynxplay force-pushed the fix/summon-cmd-spawn-reason branch from 8374a33 to bd93d88 Compare August 12, 2023 23:35
@lynxplay lynxplay merged commit 02338e5 into PaperMC:master Aug 12, 2023
@Warriorrrr Warriorrrr deleted the fix/summon-cmd-spawn-reason branch September 5, 2023 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

4 participants