mojira.dev
MCPE-189759

"transformation" component in player.json crashes the world and sends the player to the main menu

 

Note: depending on how it is triggered, it still functions properly when the world is loaded in again after getting the error. This is an issue mainly for addon developers that try to create entities that have a player's nametag without scripting.

An addon has been provided with a custom entity that does the following:

Upon spawning, it will trigger the event that adds a new component group in the player.json that causes the player to transform into a pig, see error

When giving the player the "transformation" component (preferably through triggering an event that adds a component group) it sends the player to the main menu with the following error:

Attachments

Comments 5

Could you attach an example add-on to this ticket?

There is now a functional addon attached to the issue 

When you "transform" the player you remove the server-side player entity from the world. This causes the player's client to disconnect. I think the only bug here might be that the game allows a behavior pack to load with "minecraft:transformation" inside player.json.

What do you expect to happen when you add "minecraft:transformation" to a player?

I expected it to kill the player, and spawn in an entity with the player's name tag

"transformation" does not kill entities, it despawns them and transfers some of their data to a new entity that replaces them. By contrast, when a mob is killed it does not immediately despawn, instead it continues to exist and gets tagged as dead. This allows for a death animation and, in the case of players, for the death screen. Dead non-player mobs despawn about 1 second after becoming dead.

You might want to ask on the Bedrock Addons discord for help with what you are trying to do.

Since this is more an issue of technical support with addon development than a bug in the game, I am resolving this report as Invalid.

SuperSharkGaming

(Unassigned)

Unconfirmed

Windows

Windows 10

1.21.51 Hotfix

Retrieved