mojira.dev
MCPE-232049

functional error of entity tame components in SAPI

Introduction

Usually, a tameable entity would remove “minecraft:tameable” or “minecraft:tamemount” component once it was tamed. Thus, you may never get valid response from property “tamedToPlayer” or “tamedToPlayerId“ of EntityTameableComponent or EntityTameMountComponent Class in SAPI.

Steps to reproduce

  1. create an addon that is capable to use scripts

  2. you may detect an entity whether it has tameable component by the method Entity.hasComponent(“minecraft:tameable“)

  3. summon a wolf, and the method returns true

  4. tame the wolf with bones, and the method returns false

The result

There should be a way to know which player tamed the wolf (by the property EntityTameableComponent.tamedToPlayer). However, if the component is removed after the wolf is tamed, you’re unable to access the property EntityTameableComponent.tamedToPlayer. So I suppose it as a functional error.

Attachments

Comments 6

This report does not have enough information for us to understand and reproduce the problem.

As explained in the instructions on the bug reporting page, when describing your bug, please include the following information in the Description section:

  • List of Steps to reproduce the issue

  • Expected result

  • Actual result

If you are using any add-ons, be sure to include the name and creator of each of them.

Videos and screenshots are also helpful, especially if the issue is a “visual” one.

Please Edit your report to add the above information to the Description.

This issue is currently Awaiting Response. It will automatically reopen when you add information.

Reports that do not have enough information will be closed as Incomplete.

Tamed entities store the UUID of the player than tamed them under the nbt tag OwnerID. Can you query that?

Sure it will store in the nbt. But you may not read it via SAPI. Since SAPI provides the properties, they were intend to provide a way to read the UID via SAPI. However, the properties won’t work as intended.

For issues with the addon system like this, need you to provide a sample addon that can be used to reproduce the issue.

I may offer a pack that I’m currently developing. Still, it’s a functional error. So I don’t know if you may get a hint from it, since the component is gone and you want to make out whether the property is available.

[media]

mingwangdada

(Unassigned)

Unconfirmed

Multiple

1.21.130, 1.21.123 Hotfix, 1.21.124 Hotfix, 1.21.131 Hotfix

Retrieved