Mojira Archive
MCM-1394

Entities with multiple models throw an error if they share a locator name

Partner Rank: 3

Partner Team Reporting:

Razzleberries

Verification builds:

1.17.10 dev build 6414020

Summary:

A content error is throw to the log if an entity has multiple models, each with their own locator that shares a name. We are using locators on various dog models to leash and play particles on several sizes of dog but only the locator of the first model in the entity array is used.

Impact:

Instead of creating and maintaining one complex entity, we have to create 16, one for each model.

Repro Steps:

  1. Create a new resource and behavior pack.
  2. Create two models containing at least one bone and give both of them one locator for leashes with the same name. You should have two models, each with one locator.
  3. Make sure the bone containing the locator is higher in the air for one model than the other (just for easy visual confirmation)
  4. Define a new custom entity that contains both models in its models array. You can use query.variant to decide which model is rendered.
  5. Create a new world with the resource and behavior pack applied.
  6. Summon your custom entity.

Observed Results:

When the world is first opened with the packs applied, you will see an error similar to
[Geometry][error]-razz:dog | razz:dog | Locator: Error: model already has a locator locator_body that doesn't exactly match the one wanting to be added - skipping new definition in beagle(geometry.beagle)

 

If you have more than two models for the entity, an error will be logged for each model except the first in the list. Furthermore if you try to leash the entity and its model is set to display as the second model, the leash will attach at the position of the locator in the first model.

Expected Results:

No errors should appear in the log. Only the locators that match the currently rendered model should be applied to the entity, causing the leash or any particles played from the locator to attach to the displayed model's locator location, not the first model in the array's locator location.

Screenshots/Videos attached: Yes/No

Yes. In the attached screenshot, you can see a medium and small dog who's leashes are attaching to the location that the first model (a large dog) defines.

Regression Builds:

Unknown

Notes:

As a workaround, we tried attaching the leash locator to a bone, then using an animation controller to animate the position of the bone for each dog model. Surprisingly this did not work, the leash continued to attach to the location of the bone in the first model in the array. My guess is that this is because the animation applied to the bone in the loaded model, but the locator was still being referenced from the first model, where the bone was not animated to a new position.

Unresolved

Sparks

2021-09-11, 02:01 AM

2022-05-10, 11:27 AM

2

0

Future Release

-