Mojira Archive
MCM-1526

temp variables are lost between "on_entry" and "particle_effects" now

Partner Rank: 2

Verification builds: 1.18.12, 1.18.30
Regression builds: 1.18.0

Summary: Previously, in an animation controller state, temp variables set in the on_entry field were accessible in the particle_effects field. To my knowledge, this was the only possible way to copy a variable from an entity to a particle. This no longer works, the temp variable is immediately lost at the end of the expression.

Impact: Particles no longer work as intended, content log errors appear instead. This breaks both existing and upcoming content.

Repro Steps:

  1. Download and open "Modern Furniture" from the marketplace.
  2. Enable cheats fly out of the opening area to somewhere safe (or complete the tutorial)
  3. /give @p modern:bunk_bed_spawn_egg
  4. /give @p diamond_hoe
  5. Place the bed then use the "destroy tool" on it

Expected Results: Many particles appear

Observed Results: No particles appear. Instead, a content log error appears.

Screenshots/Videos attached: Yes

Notes: The relevant file is mfRP/animation_controllers/modern/furniture.json and the relevant contents are thusly:

{
   "format_version": "1.10.0",
   "animation_controllers": {
      "controller.animation.modern.furniture": {
         "states": {
            "dead": {
               "on_entry": [
                  "temp.particle_quantity=variable.particle_quantity;",
                  "temp.uv_x=variable.particle_uv_x; temp.uv_y=variable.particle_uv_y;"
               ],
               "particle_effects": [
                  {
                     "effect": "break",
                     "pre_effect_script": "variable.particle_quantity=temp.particle_quantity; variable.uv_x=temp.uv_x; variable.uv_y=temp.uv_y;"
                  }
               ]
            }
         }
      }
   }
}

Fixed

[Mod] tryashtar

2022-03-31, 02:03 AM

2024-03-18, 09:04 PM

2024-03-18, 09:04 PM

3

0

Future Release

-