Animated-Java / animated-java

A Blockbench plugin that makes complex animation a breeze in Minecraft: Java Edition.
Other
159 stars 26 forks source link

[BUG] Command keyframe on locator without entity leads to error #201

Closed MrMakistein closed 3 months ago

MrMakistein commented 3 months ago

Describe the bug Using a command keyframe on a locator that doesn't have an entity leads to an error when exporting.

To Reproduce

  1. Create a random model and add a locator to any bone.
  2. Make sure "Use Entity" is unticked in the locator config.
  3. Add a random command keyframe to the locator
  4. Export
  5. See error

Expected behavior Not quite sure. Either a warning should be displayed explaining that an entity is needed or a marker could get automatically selected when adding a command keyframe on a locator without an entity.

Error message: Cannot read properties of null (reading 'use_entity') TypeError: Cannot read properties of null (reading 'use_entity') at createPassengerStorage (:3744:5074) at generateRootEntityPassengers (:3744:200) at compileDataPack (:3744:7434) at actuallyExportProject (:3744:27006) at async exportProject (:3749:68)

Desktop (please complete the following information):

SnaveSutit commented 3 months ago

Command keyframes shouldn't require an entity. So it should just export and work fine. (To address the expected behavior)

SnaveSutit commented 3 months ago

Fixed in pre10