Skip to content

Mewtwo Update#667

Closed
pyris-dev wants to merge 1 commit into
smell-of-curry:mainfrom
pyris-dev:feature/mewtwo-update
Closed

Mewtwo Update#667
pyris-dev wants to merge 1 commit into
smell-of-curry:mainfrom
pyris-dev:feature/mewtwo-update

Conversation

@pyris-dev

@pyris-dev pyris-dev commented Oct 2, 2025

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

Release Notes

  • New Features

    • Added cloning machine visuals including battery holders, containment chambers (and liquid fills), DNA scanners, cooling stations, and connecting pipes with state-driven animations.
    • Added a new disinfecting particle effect.
    • Added new textures for cloning machine parts and special items.
  • Improvements

    • Enhanced item visuals with a new idle animation, updated item scaling/positioning behavior, and improved render/attachable support.
    • Updated trainer client animation setup to include skin index selection.

Note

Adds cloning machine client entities and geometry (containment chamber/liquid, DNA scanner, cooling station, battery holder, pipes), a contained Mewtwo, item_holder idle/attachables, new disinfect particle, and item texture mappings; updates Mewtwo animations.

  • Cloning Machine (client):
    • Add entities: pokeb:containment_chamber, pokeb:containment_chamber_liquid, pokeb:dna_scanner, pokeb:cooling_station, pokeb:battery_holder, and related pipe entities.
    • Add pokeb:contained_mewtwo client entity (duplicate entry under cloningMachine/ and root).
    • Introduce matching geometry in models/entity/cloningMachine/*.geo.json for all components and pipes.
  • Item Holder:
    • Add animation.item_holder.idle and hook via scripts with pokeb:scale; enable attachables; update visible bounds in geometry.
  • Mewtwo Animations:
    • Replace/format animations/pokemon/mewtwo.animation.json, expanding animations and adding animation.mewtwo.rest.
  • Trainer:
    • Add variable.skin_index = query.property('pokeb:skin_index'); to pre_animation.
  • Particles:
    • Add particles/disinfect.particle.json effect.
  • Textures:
    • Extend textures/item_texture.json with mappings for containment_fluid, cloning machine items, wrench, and mew_eyelash variants.

Written by Cursor Bugbot for commit 4066f06. This will update automatically on new commits. Configure here.

@coderabbitai

coderabbitai Bot commented Oct 2, 2025

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This pull request adds a comprehensive cloning machine feature system comprising five animation controllers, six animation sequences, eight entity definitions, six geometry models, and supporting particle and texture assets. The changes are primarily data-driven JSON configuration files that define state machines, bone animations, and client-side entity rendering with minimal modifications to existing files.

Changes

Cloning Machine Feature System

Layer / File(s) Summary
Battery Holder System
animation_controllers/cloningMachine/battery_holder.json, animations/cloningMachine/battery_holder.animation.json, entity/cloningMachine/battery_holder.json, models/entity/cloningMachine/battery_holder.geo.json
State machine with four battery count states (empty, one, two, three) driven by pokeb:batteries property; animations define static and keyframed bone transforms for particle effects; entity wires animations and geometry with 0.75 scale.
Battery Holder Pipe
animation_controllers/cloningMachine/battery_holder_pipe.json, animations/cloningMachine/battery_holder_pipe.animation.json, entity/cloningMachine/pipes/battery_holder_pipe.json, models/entity/cloningMachine/battery_holder_pipe.geo.json
Pipe variant with idle and three run states (run1, run2, run3) mapped to battery counts; animations provide per-bone position/scale keyframes with pre/post transitions; entity configuration with multipart bone geometry.
Containment Chamber Core
animation_controllers/cloningMachine/containment_chamber.json, animations/cloningMachine/containment_chamber.animation.json, entity/cloningMachine/containment_chamber.json
Six-state chamber system (empty, filling, breaking, opening, opening_ditto, closing) transitioned via pokeb:state; comprehensive animations with dozens of bone transforms for doors, water, particles, and effects.
Containment Chamber Liquid
animation_controllers/cloningMachine/containment_chamber_liquid.json, animations/cloningMachine/containment_chamber_liquid.animation.json, entity/cloningMachine/containment_chamber_liquid.json, models/entity/cloningMachine/containment_chamber_liquid.geo.json
Discrete 16-level fill system (fill_0 to fill_15) driven by variable.fluid_amount; animations provide per-level water layer and particle keyframes; entity maps fluid_amount variable in pre_animation; geometry defines water, droplet, and particle bones.
DNA Scanner System
animation_controllers/cloningMachine/dna_scanner.json, animations/cloningMachine/dna_scanner.animation.json, entity/cloningMachine/dna_scanner.json, entity/cloningMachine/pipes/dna_scanner_pipe.json, models/entity/cloningMachine/dna_scanner_pipe.geo.json
Five-state scanner (idle_closed, idle_open, opening, closing, error) with pokeb:state transitions; animations keyframe green/red bone positions and bone39 rotations; includes pipe variant with simplified geometry.
Cooling Station System
animations/cloningMachine/cooling_station.animation.json, entity/cloningMachine/cooling_station.json, entity/cloningMachine/pipes/cooling_station_pipe.json, models/entity/cloningMachine/cooling_station.geo.json, models/entity/cloningMachine/cooling_station_pipe.geo.json
Idle and potion/shake animations conditioned on variable.has_fluid and variable.potion_amount; cooling_station_pipe entity variant; pipe geometry with bone5–bone31 hierarchy.
Mewtwo Containment
entity/contained_mewtwo.json, entity/cloningMachine/contained_mewtwo.json
Two contained Mewtwo entity definitions binding pokeb:scale and mapping rest animation; use geometry.mewtwo and zombie material.
Item Holder Enhancement
animations/item_holder.animation.json, entity/item_holder.json, models/entity/item_holder.geo.json
Item holder adds idle animation with q.property rotation expressions; entity adds scripts with scale binding and animate list; geometry bounds widened (1→2) and height increased (1→1.5) with offset adjustment.
Trainer & Asset Updates
entity/trainer.json, textures/item_texture.json
Trainer entity captures pokeb:skin_index in pre_animation; nine texture mappings added for containment items and Mew eyelash variants.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Homogeneous patterns: Multiple files follow consistent JSON templates (animation controllers with state/transition patterns, entity definitions with standard properties, geometry with uniform bone/cube structures), reducing per-file verification complexity.
  • High file count (30+ files): Requires systematic cross-checking of state transitions, animation references, property bindings, and bone hierarchy consistency, but repetition in patterns eases review.
  • Low logic density: Changes are declarative resource configuration (keyframes, state machines, property mappings) without executable logic, reducing reasoning overhead.
  • Clear functional boundaries: Each system (battery, chamber, scanner, etc.) is architecturally isolated with well-defined property inputs and animation outputs.

Review focus areas:

  • Verify pokeb:batteries (0–3) and pokeb:state state transitions match intended game logic.
  • Confirm variable.fluid_amount (0–15) progression aligns with liquid fill visual design.
  • Validate bone names in animation keyframes match geometry hierarchy definitions.
  • Check q.property() and variable references are defined in codebase (pokeb:rotation_x, pokeb:rotation_y, pokeb:rotation_z, pokeb:scale, pokeb:skin_index).

Poem

🐰 Hop with glee, the cloning machines shine bright,
With batteries, pipes, and chambers in sight,
DNA scanners spin and animations play,
Mewtwo contained in the grandest display!
Through states and keyframes, a feature complete—
Another Pokémon adventure, oh so sweet! 🧬✨

Suggested reviewers

  • smell-of-curry
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title "Mewtwo Update" is vague and overly broad, failing to convey the primary scope of changes which includes extensive cloning machine components, animations, geometry, and item holder updates in addition to Mewtwo. Consider a more specific title that captures the main changes, such as "Add cloning machine feature with contained Mewtwo" or "Implement cloning machine system with Mewtwo containment."
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3bab3df and 60a14aa.

⛔ Files ignored due to path filters (11)
  • textures/entity/containment_chamber.png is excluded by !**/*.png
  • textures/items/battery_holder.png is excluded by !**/*.png
  • textures/items/broken_mew_eyelash.png is excluded by !**/*.png
  • textures/items/containment_chamber.png is excluded by !**/*.png
  • textures/items/containment_fluid.png is excluded by !**/*.png
  • textures/items/cooling_station.png is excluded by !**/*.png
  • textures/items/damaged_mew_eyelash.png is excluded by !**/*.png
  • textures/items/dna_scanner.png is excluded by !**/*.png
  • textures/items/mew_eyelash.png is excluded by !**/*.png
  • textures/items/wrench.png is excluded by !**/*.png
  • textures/particle/magic.png is excluded by !**/*.png
📒 Files selected for processing (30)
  • animation_controllers/cloningMachine/battery_holder.json (1 hunks)
  • animation_controllers/cloningMachine/battery_holder_pipe.json (1 hunks)
  • animation_controllers/cloningMachine/containment_chamber.json (1 hunks)
  • animation_controllers/cloningMachine/containment_chamber_liquid.json (1 hunks)
  • animation_controllers/cloningMachine/dna_scanner.json (1 hunks)
  • animations/cloningMachine/battery_holder.animation.json (1 hunks)
  • animations/cloningMachine/battery_holder_pipe.animation.json (1 hunks)
  • animations/cloningMachine/containment_chamber.animation.json (1 hunks)
  • animations/cloningMachine/containment_chamber_liquid.animation.json (1 hunks)
  • animations/cloningMachine/cooling_station.animation.json (1 hunks)
  • animations/item_holder.animation.json (1 hunks)
  • entity/cloningMachine/battery_holder.json (1 hunks)
  • entity/cloningMachine/containment_chamber.json (1 hunks)
  • entity/cloningMachine/containment_chamber_liquid.json (1 hunks)
  • entity/cloningMachine/cooling_station.json (1 hunks)
  • entity/cloningMachine/dna_scanner.json (1 hunks)
  • entity/cloningMachine/pipes/battery_holder_pipe.json (1 hunks)
  • entity/cloningMachine/pipes/cooling_station_pipe.json (1 hunks)
  • entity/cloningMachine/pipes/dna_scanner_pipe.json (1 hunks)
  • entity/item_holder.json (1 hunks)
  • entity/trainer.json (1 hunks)
  • models/entity/cloningMachine/battery_holder.geo.json (1 hunks)
  • models/entity/cloningMachine/battery_holder_pipe.geo.json (1 hunks)
  • models/entity/cloningMachine/containment_chamber_liquid.geo.json (1 hunks)
  • models/entity/cloningMachine/cooling_station.geo.json (1 hunks)
  • models/entity/cloningMachine/cooling_station_pipe.geo.json (1 hunks)
  • models/entity/cloningMachine/dna_scanner_pipe.geo.json (1 hunks)
  • models/entity/item_holder.geo.json (1 hunks)
  • particles/disinfect.particle.json (1 hunks)
  • textures/item_texture.json (1 hunks)
🔇 Additional comments (5)
animations/cloningMachine/containment_chamber.animation.json (1)

19-118: Great staggered keyframe sequencing for bubble drift.

The alternating pre/post easing you scripted on the bubble bones gives a lively fluid wobble without extra controllers—nicely done.

animations/cloningMachine/cooling_station.animation.json (1)

33-42: Confirm liquid/potion amount variables are populated.

Both potion animations override prior state and immediately sample variable.liquid_amount / variable.potion_amount to drive the fluid scale. If the controller doesn’t set those variables every tick before the override kicks in, the scale will collapse to 0 and the bottle appears empty. Please double-check the controller logic populates them (with sane defaults) during idle and each potion state.

entity/cloningMachine/dna_scanner.json (1)

21-32: Clean animation/controller wiring.

The controller slot and state animations are mapped consistently—looks solid.

textures/item_texture.json (1)

505-531: All new texture assets are present
Confirmed that each textures/items/*.png file referenced in item_texture.json exists.

entity/item_holder.json (1)

15-28: Ensure pokeb:scale has a valid default
q.property('pokeb:scale') returns 0 if unset, causing invisible holders. Confirm your server-side registration initializes pokeb:scale (e.g. default 1) for every entity before relying on it.

Comment thread animations/cloningMachine/containment_chamber_liquid.animation.json
Comment on lines +22 to +27
"controller": "controller.animation.battery_holder",
"empty": "animation.battery_holder.empty",
"one": "animation.battery_holder.one",
"two": "animation.battery_holder.two",
"three": "animation.battery_holder.three"
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Expose all animations to scripts

The entity stores extra animations (empty/one/two/three), yet the scripts.animate array only triggers the controller. Without calling animate for the child clips, Bedrock won’t actually play them. Please either move those clips into the controller or add them to scripts.animate.

Comment on lines +21 to +38
"animations": {
"default": "controller.animation.containment_chamber_liquid",
"water_fill0": "animation.containment_chamber_liquid.water_fill0",
"water_fill1": "animation.containment_chamber_liquid.water_fill1",
"water_fill2": "animation.containment_chamber_liquid.water_fill2",
"water_fill3": "animation.containment_chamber_liquid.water_fill3",
"water_fill4": "animation.containment_chamber_liquid.water_fill4",
"water_fill5": "animation.containment_chamber_liquid.water_fill5",
"water_fill6": "animation.containment_chamber_liquid.water_fill6",
"water_fill7": "animation.containment_chamber_liquid.water_fill7",
"water_fill8": "animation.containment_chamber_liquid.water_fill8",
"water_fill9": "animation.containment_chamber_liquid.water_fill9",
"water_fill10": "animation.containment_chamber_liquid.water_fill10",
"water_fill11": "animation.containment_chamber_liquid.water_fill11",
"water_fill12": "animation.containment_chamber_liquid.water_fill12",
"water_fill13": "animation.containment_chamber_liquid.water_fill13",
"water_fill14": "animation.containment_chamber_liquid.water_fill14",
"water_fill15": "animation.containment_chamber_liquid.water_fill15"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Controller misses liquid states

You declare 16 water_fill* animations but only reference the controller via scripts.animate. Unless the controller explicitly blends in these clips, they’ll never run. Consider mapping the controller output to the same names (or add them to scripts.animate) so each fill tier renders.

Comment on lines +10 to +20
"default": "textures/entity/containment_chamber"
},
"geometry": {
"default": "geometry.dna_scanner_pipe"
},
"scripts": {
"scale": "0.65"
},
"render_controllers": [
"controller.render.default"
]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Texture path likely incorrect

This entity points textures/default to textures/entity/containment_chamber, but the pipeline geometry/animations for the DNA scanner pipe expect their own atlas entry (textures/entity/dna_scanner_pipe). With the current config the pipe will render with the containment chamber sheet, producing wrong UVs. Please switch to the dedicated DNA scanner pipe texture before shipping.

🤖 Prompt for AI Agents
In entity/cloningMachine/pipes/dna_scanner_pipe.json around lines 10–20, the
"textures" default is set to "textures/entity/containment_chamber" but the
geometry expects "textures/entity/dna_scanner_pipe"; update the "textures": {
"default": "textures/entity/dna_scanner_pipe" } entry to point to the dedicated
DNA scanner pipe texture and verify that the corresponding texture atlas file
and atlas key ("textures/entity/dna_scanner_pipe") exist in the assets so the
geometry UVs map correctly.

Comment on lines +344 to +401
554
],
"uv_size": [
8,
3
]
},
"east": {
"uv": [
462,
557
],
"uv_size": [
3,
3
]
},
"south": {
"uv": [
83,
554
],
"uv_size": [
8,
3
]
},
"west": {
"uv": [
465,
557
],
"uv_size": [
3,
3
]
},
"up": {
"uv": [
554,
234
],
"uv_size": [
8,
3
]
},
"down": {
"uv": [
554,
424
],
"uv_size": [
8,
-3
]
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

UV down face has negative height

Cube on Line 344 sets "uv_size": [8, -3] for the down face. Bedrock treats face UV sizes as absolute dimensions; negative height mirrors/warps the texture and regularly produces rendering artifacts. Please make the value positive (swap origin if needed) to keep texels stable.

🤖 Prompt for AI Agents
In models/entity/cloningMachine/cooling_station_pipe.geo.json around lines 344
to 401, the cube's "down" face specifies "uv_size": [8, -3], which uses a
negative height and causes texture mirroring/artifacts; change the height to a
positive value (e.g., [8, 3]) and, if the visual orientation must be preserved,
flip the "uv" origin Y coordinate accordingly so the mapped region covers the
same texels with a positive size.

@smell-of-curry smell-of-curry force-pushed the feature/mewtwo-update branch 2 times, most recently from cec107e to 376d4eb Compare October 7, 2025 21:12
cursor[bot]

This comment was marked as outdated.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
animations/cloningMachine/containment_chamber_liquid.animation.json (1)

14-26: Missing bubble bones in geometry

Animations still drive bubbles, bubble2, bubble4, and bubble8, but models/entity/cloningMachine/containment_chamber_liquid.geo.json does not define bones with those names. Every keyframe on these tracks is ignored at runtime, so the intended bubble motion never renders. Please either add the corresponding bones (with neutral transforms) to the geometry file or retarget these timelines to existing bones such as waterparticle*/drop*.

Also applies to: 84-96, 151-163

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 60a14aa and 376d4eb.

⛔ Files ignored due to path filters (11)
  • textures/entity/containment_chamber.png is excluded by !**/*.png
  • textures/items/battery_holder.png is excluded by !**/*.png
  • textures/items/broken_mew_eyelash.png is excluded by !**/*.png
  • textures/items/containment_chamber.png is excluded by !**/*.png
  • textures/items/containment_fluid.png is excluded by !**/*.png
  • textures/items/cooling_station.png is excluded by !**/*.png
  • textures/items/damaged_mew_eyelash.png is excluded by !**/*.png
  • textures/items/dna_scanner.png is excluded by !**/*.png
  • textures/items/mew_eyelash.png is excluded by !**/*.png
  • textures/items/wrench.png is excluded by !**/*.png
  • textures/particle/magic.png is excluded by !**/*.png
📒 Files selected for processing (30)
  • animation_controllers/cloningMachine/battery_holder.json (1 hunks)
  • animation_controllers/cloningMachine/battery_holder_pipe.json (1 hunks)
  • animation_controllers/cloningMachine/containment_chamber.json (1 hunks)
  • animation_controllers/cloningMachine/containment_chamber_liquid.json (1 hunks)
  • animation_controllers/cloningMachine/dna_scanner.json (1 hunks)
  • animations/cloningMachine/battery_holder.animation.json (1 hunks)
  • animations/cloningMachine/battery_holder_pipe.animation.json (1 hunks)
  • animations/cloningMachine/containment_chamber.animation.json (1 hunks)
  • animations/cloningMachine/containment_chamber_liquid.animation.json (1 hunks)
  • animations/cloningMachine/cooling_station.animation.json (1 hunks)
  • animations/item_holder.animation.json (1 hunks)
  • entity/cloningMachine/battery_holder.json (1 hunks)
  • entity/cloningMachine/containment_chamber.json (1 hunks)
  • entity/cloningMachine/containment_chamber_liquid.json (1 hunks)
  • entity/cloningMachine/cooling_station.json (1 hunks)
  • entity/cloningMachine/dna_scanner.json (1 hunks)
  • entity/cloningMachine/pipes/battery_holder_pipe.json (1 hunks)
  • entity/cloningMachine/pipes/cooling_station_pipe.json (1 hunks)
  • entity/cloningMachine/pipes/dna_scanner_pipe.json (1 hunks)
  • entity/item_holder.json (1 hunks)
  • entity/trainer.json (1 hunks)
  • models/entity/cloningMachine/battery_holder.geo.json (1 hunks)
  • models/entity/cloningMachine/battery_holder_pipe.geo.json (1 hunks)
  • models/entity/cloningMachine/containment_chamber_liquid.geo.json (1 hunks)
  • models/entity/cloningMachine/cooling_station.geo.json (1 hunks)
  • models/entity/cloningMachine/cooling_station_pipe.geo.json (1 hunks)
  • models/entity/cloningMachine/dna_scanner_pipe.geo.json (1 hunks)
  • models/entity/item_holder.geo.json (1 hunks)
  • particles/disinfect.particle.json (1 hunks)
  • textures/item_texture.json (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • animations/cloningMachine/battery_holder_pipe.animation.json
🚧 Files skipped from review as they are similar to previous changes (18)
  • models/entity/cloningMachine/dna_scanner_pipe.geo.json
  • entity/cloningMachine/pipes/battery_holder_pipe.json
  • entity/cloningMachine/containment_chamber.json
  • animations/cloningMachine/cooling_station.animation.json
  • models/entity/cloningMachine/battery_holder.geo.json
  • animations/item_holder.animation.json
  • entity/cloningMachine/battery_holder.json
  • entity/cloningMachine/pipes/cooling_station_pipe.json
  • animation_controllers/cloningMachine/battery_holder_pipe.json
  • entity/cloningMachine/containment_chamber_liquid.json
  • models/entity/cloningMachine/cooling_station_pipe.geo.json
  • animation_controllers/cloningMachine/containment_chamber_liquid.json
  • entity/cloningMachine/pipes/dna_scanner_pipe.json
  • animations/cloningMachine/battery_holder.animation.json
  • models/entity/item_holder.geo.json
  • particles/disinfect.particle.json
  • textures/item_texture.json
  • entity/cloningMachine/dna_scanner.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Cursor Bugbot
🔇 Additional comments (1)
entity/item_holder.json (1)

15-20: Confirm pokeb:scale property availability.

The new scale script queries q.property('pokeb:scale'). If that property isn’t defined (or defaults to 0) in the corresponding behavior entity, the holder will render at scale 0 and disappear. Please double-check that pokeb:scale exists with a default of 1 (or another sensible value) in the behavior pack before we ship this change.

Comment on lines +9 to +14
"textures": {
"default": "textures/entity/containment_chamber"
},
"geometry": {
"default": "geometry.cooling_station"
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Bind the cooling station to its own texture.

The client entity still points at textures/entity/containment_chamber, so the new geometry will render with the wrong atlas and the dedicated cooling_station texture never gets used. Swap this reference to the cooling station texture asset.

Run this to confirm the available texture path:


🏁 Script executed:

#!/bin/bash
# Locate cooling-station textures to wire up the correct resource
fd --ignore-file .gitignore --type f 'cooling_station' textures

Length of output: 34


Update cooling station texture reference
Change the default texture in entity/cloningMachine/cooling_station.json from textures/entity/containment_chamber to textures/items/cooling_station so the correct asset is used.

🤖 Prompt for AI Agents
In entity/cloningMachine/cooling_station.json around lines 9 to 14, the
"textures.default" value references the wrong asset
("textures/entity/containment_chamber"); update that field to
"textures/items/cooling_station" so the JSON points to the correct texture
resource for the cooling station.

@pyris-dev pyris-dev force-pushed the feature/mewtwo-update branch from 376d4eb to e9266f7 Compare October 15, 2025 23:32

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
animation_controllers/cloningMachine/containment_chamber_liquid.json (1)

7-886: Add the missing fill_16 state.

Line 8: The controller tops out at fill_15, so when variable.fluid_amount == 16 the machine never leaves the previous state and water_fill16 can’t play. Please add a fill_16 state (wired to water_fill16) and extend every state’s transitions with a "fill_16": "variable.fluid_amount == 16" branch so the last fill tier is reachable.

                         {
                             "fill_15": "variable.fluid_amount == 15"
+                        },
+                        {
+                            "fill_16": "variable.fluid_amount == 16"
                         }
                     ]
                 },
+                "fill_16": {
+                    "animations": [
+                        "water_fill16"
+                    ],
+                    "transitions": [
+                        {
+                            "fill_0": "variable.fluid_amount == 0"
+                        },
+                        ...
+                        {
+                            "fill_16": "variable.fluid_amount == 16"
+                        }
+                    ]
+                }
🧹 Nitpick comments (3)
animations/cloningMachine/containment_chamber.animation.json (3)

1735-1743: Add explicit animation_length to ‘empty’.

Not required but avoids engine defaults ambiguity. Recommend 0s static.

   "animation.containment_chamber.empty": {
-    "loop": "hold_on_last_frame",
+    "loop": "hold_on_last_frame",
+    "animation_length": 0,
     "bones": {

624-626: Unused ‘sparks’ bone?

It’s permanently hidden here and not driven elsewhere. Remove to reduce payload, or wire it in if intended.

-        "sparks": {
-          "scale": [0, 0, 1]
-        },

220-621: Reduce duplication for green/green1–5 tracks.

These are near‑identical oscillations with phase/sign flips. Consider generating these tracks via a small script (source-of-truth) to avoid manual drift and ease updates.

I can provide a tiny generator (e.g., Node/Python) and an ADR note.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 376d4eb and e9266f7.

⛔ Files ignored due to path filters (11)
  • textures/entity/containment_chamber.png is excluded by !**/*.png
  • textures/items/battery_holder.png is excluded by !**/*.png
  • textures/items/broken_mew_eyelash.png is excluded by !**/*.png
  • textures/items/containment_chamber.png is excluded by !**/*.png
  • textures/items/containment_fluid.png is excluded by !**/*.png
  • textures/items/cooling_station.png is excluded by !**/*.png
  • textures/items/damaged_mew_eyelash.png is excluded by !**/*.png
  • textures/items/dna_scanner.png is excluded by !**/*.png
  • textures/items/mew_eyelash.png is excluded by !**/*.png
  • textures/items/wrench.png is excluded by !**/*.png
  • textures/particle/magic.png is excluded by !**/*.png
📒 Files selected for processing (30)
  • animation_controllers/cloningMachine/battery_holder.json (1 hunks)
  • animation_controllers/cloningMachine/battery_holder_pipe.json (1 hunks)
  • animation_controllers/cloningMachine/containment_chamber.json (1 hunks)
  • animation_controllers/cloningMachine/containment_chamber_liquid.json (1 hunks)
  • animation_controllers/cloningMachine/dna_scanner.json (1 hunks)
  • animations/cloningMachine/battery_holder.animation.json (1 hunks)
  • animations/cloningMachine/battery_holder_pipe.animation.json (1 hunks)
  • animations/cloningMachine/containment_chamber.animation.json (1 hunks)
  • animations/cloningMachine/containment_chamber_liquid.animation.json (1 hunks)
  • animations/cloningMachine/cooling_station.animation.json (1 hunks)
  • animations/item_holder.animation.json (1 hunks)
  • entity/cloningMachine/battery_holder.json (1 hunks)
  • entity/cloningMachine/containment_chamber.json (1 hunks)
  • entity/cloningMachine/containment_chamber_liquid.json (1 hunks)
  • entity/cloningMachine/cooling_station.json (1 hunks)
  • entity/cloningMachine/dna_scanner.json (1 hunks)
  • entity/cloningMachine/pipes/battery_holder_pipe.json (1 hunks)
  • entity/cloningMachine/pipes/cooling_station_pipe.json (1 hunks)
  • entity/cloningMachine/pipes/dna_scanner_pipe.json (1 hunks)
  • entity/item_holder.json (1 hunks)
  • entity/trainer.json (1 hunks)
  • models/entity/cloningMachine/battery_holder.geo.json (1 hunks)
  • models/entity/cloningMachine/battery_holder_pipe.geo.json (1 hunks)
  • models/entity/cloningMachine/containment_chamber_liquid.geo.json (1 hunks)
  • models/entity/cloningMachine/cooling_station.geo.json (1 hunks)
  • models/entity/cloningMachine/cooling_station_pipe.geo.json (1 hunks)
  • models/entity/cloningMachine/dna_scanner_pipe.geo.json (1 hunks)
  • models/entity/item_holder.geo.json (1 hunks)
  • particles/disinfect.particle.json (1 hunks)
  • textures/item_texture.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (20)
  • entity/cloningMachine/battery_holder.json
  • models/entity/cloningMachine/containment_chamber_liquid.geo.json
  • entity/cloningMachine/pipes/battery_holder_pipe.json
  • animation_controllers/cloningMachine/containment_chamber.json
  • entity/item_holder.json
  • animations/cloningMachine/battery_holder.animation.json
  • animations/cloningMachine/containment_chamber_liquid.animation.json
  • entity/cloningMachine/dna_scanner.json
  • entity/cloningMachine/containment_chamber_liquid.json
  • animations/cloningMachine/battery_holder_pipe.animation.json
  • models/entity/cloningMachine/cooling_station.geo.json
  • models/entity/cloningMachine/dna_scanner_pipe.geo.json
  • entity/cloningMachine/pipes/cooling_station_pipe.json
  • particles/disinfect.particle.json
  • entity/cloningMachine/containment_chamber.json
  • entity/cloningMachine/pipes/dna_scanner_pipe.json
  • models/entity/item_holder.geo.json
  • models/entity/cloningMachine/battery_holder.geo.json
  • entity/trainer.json
  • animations/item_holder.animation.json
🔇 Additional comments (5)
animation_controllers/cloningMachine/dna_scanner.json (1)

1-105: Controller looks solid.

State definitions and transitions line up correctly with the expected pokeb:state values. Nice work keeping the transitions comprehensive.

animations/cloningMachine/containment_chamber.animation.json (4)

1120-1131: Intent check: water5 scale collapses X to 0 at 9.0417.

Filling ends by setting scale.x from 0.6 → 0, which may visually pop/hide this layer. Confirm this is intentional vs. [1,1,1].


1486-1550: MoLang rotation usage LGTM.

Dynamic spin on glassparticle1/2 with timed show/hide is correct and idiomatic.


2-2: Confirm format_version matches target engine.

1.8.0 is commonly fine for animations; verify against your pack’s minimum supported Bedrock version.


4-4: Animation references are correctly defined and used.

Verification confirms all six animations (filling, breaking, opening, closing, opening_ditto, empty) are properly defined in the animation file and correctly referenced in the entity file with exact name matching. No action needed.

Comment on lines +16 to +23
"scale": "0.75",
"pre_animation": [
"variable.potion_amount = query.property('pokeb:potion_amount');",
"variable.has_fluid = query.property('pokeb:has_fluid');"
],
"animate": [
"idle"
]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Initialize variable.liquid_amount before the animation runs.

Lines 18‑22: animation.cooling_station.potion* scales water6 with variable.liquid_amount, but the pre-animation script never sets that variable, so it stays 0 and the fluid column never appears during potion cycles. Add the property lookup alongside the existing assignments.

                 "pre_animation": [
                     "variable.potion_amount = query.property('pokeb:potion_amount');",
-                    "variable.has_fluid = query.property('pokeb:has_fluid');"
+                    "variable.has_fluid = query.property('pokeb:has_fluid');",
+                    "variable.liquid_amount = query.property('pokeb:liquid_amount');"
                 ],
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"scale": "0.75",
"pre_animation": [
"variable.potion_amount = query.property('pokeb:potion_amount');",
"variable.has_fluid = query.property('pokeb:has_fluid');"
],
"animate": [
"idle"
]
"scale": "0.75",
"pre_animation": [
"variable.potion_amount = query.property('pokeb:potion_amount');",
"variable.has_fluid = query.property('pokeb:has_fluid');",
"variable.liquid_amount = query.property('pokeb:liquid_amount');"
],
"animate": [
"idle"
]
🤖 Prompt for AI Agents
In entity/cloningMachine/cooling_station.json around lines 16 to 23, the
pre_animation block initializes variable.potion_amount and variable.has_fluid
but never sets variable.liquid_amount, so animation steps that scale water6 with
variable.liquid_amount remain zero; add a line in the pre_animation array to
assign variable.liquid_amount = query.property('pokeb:liquid_amount'); (placed
alongside the existing property lookups) so the fluid column is initialized
before animations run.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

♻️ Duplicate comments (2)
animation_controllers/cloningMachine/containment_chamber_liquid.json (1)

6-886: ⚠️ Critical issue persists: Missing fill_16 state and transitions.

This is the same issue flagged in the previous review. The animation file (animations/cloningMachine/containment_chamber_liquid.animation.json) defines a water_fill16 animation, but the controller still lacks a corresponding fill_16 state and transitions for variable.fluid_amount == 16. When fluid level reaches 16, the controller cannot transition to the final fill state and the animation remains stuck on fill_15.

Add a fill_16 state (lines 887–932, before the closing brace on line 887) that references water_fill16, and update every existing state's transitions array to include a fill_16 entry for the condition variable.fluid_amount == 16.

Example addition for fill_16 state:

"fill_16": {
  "animations": [
    "water_fill16"
  ],
  "transitions": [
    {
      "fill_0": "variable.fluid_amount == 0"
    },
    {
      "fill_1": "variable.fluid_amount == 1"
    },
    ...
    {
      "fill_16": "variable.fluid_amount == 16"
    }
  ]
}

Then add { "fill_16": "variable.fluid_amount == 16" } as the final transition entry in every existing state (e.g., lines 11–60 for fill_0, lines 66–115 for fill_1, etc.).

entity/cloningMachine/pipes/dna_scanner_pipe.json (1)

10-10: Texture path mismatch—same critical issue from previous review.

Line 10 incorrectly references textures/entity/containment_chamber, but the geometry geometry.dna_scanner_pipe requires its own dedicated texture atlas textures/entity/dna_scanner_pipe. The current mismatch will cause incorrect UV mapping and visual corruption at runtime.

Apply this fix:

 "textures": {
-    "default": "textures/entity/containment_chamber"
+    "default": "textures/entity/dna_scanner_pipe"
 }

Ensure the texture atlas file textures/entity/dna_scanner_pipe.png and corresponding entry in the item/block texture registry exist in the repository.

🧹 Nitpick comments (3)
animations/cloningMachine/containment_chamber.animation.json (1)

18-621: Extreme code duplication across green particle bones.

The green, green1, green2, green3, green4, and green5 bones (lines 18–621) follow nearly identical keyframe patterns with the same 25 timestamps, creating a ~600-line sparkling effect. The only variation is z-position alternating between +1/-1 (opposite pairs), which suggests this was copy-pasted or generated. While this is valid and functional, it significantly impacts maintainability.

Consider one or more of the following for future iterations:

  • Document the pattern in a code comment explaining that these bones create a synchronized flickering effect.
  • Use an animation generator (external tool/build step) to reduce manual duplication.
  • Group bones by behavior with a naming convention (e.g., green_flicker_pos, green_flicker_neg) to make intent clearer.

Example comment to add near line 18:

"green": {
  "position": {
    "0.0": [0, 0, 0],
    // Synchronized flicker effect: z oscillates 0 ↔ 1 every ~0.5 frames for 11 seconds
    "0.5": { "pre": [0, 0, 0], "post": [0, 0, 1] },
    ...
models/entity/cloningMachine/cooling_station.geo.json (1)

14-419: Consider renaming auto-generated bone identifiers for maintainability. Bones such as bone, bone2, bone3, bone49, bone50, bone51, bone52, bone53 are Blockbench-generated defaults. More descriptive names (e.g., cooler_frame, potion_hatch_top, potion_hatch_left, water_fill_layer, etc.) would improve readability and make animations and related configurations easier to maintain.

particles/disinfect.particle.json (1)

1-73: Consider adding a trailing newline to the JSON file.

The file lacks a trailing newline at the end, which is a common formatting convention and may trigger linter warnings in some CI/CD pipelines.

Apply this diff to add a trailing newline:

 		}
 	}
 }
+
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a5f4e0f and 2a0c5a7.

⛔ Files ignored due to path filters (11)
  • textures/entity/containment_chamber.png is excluded by !**/*.png
  • textures/items/battery_holder.png is excluded by !**/*.png
  • textures/items/broken_mew_eyelash.png is excluded by !**/*.png
  • textures/items/containment_chamber.png is excluded by !**/*.png
  • textures/items/containment_fluid.png is excluded by !**/*.png
  • textures/items/cooling_station.png is excluded by !**/*.png
  • textures/items/damaged_mew_eyelash.png is excluded by !**/*.png
  • textures/items/dna_scanner.png is excluded by !**/*.png
  • textures/items/mew_eyelash.png is excluded by !**/*.png
  • textures/items/wrench.png is excluded by !**/*.png
  • textures/particle/magic.png is excluded by !**/*.png
📒 Files selected for processing (30)
  • animation_controllers/cloningMachine/battery_holder.json (1 hunks)
  • animation_controllers/cloningMachine/battery_holder_pipe.json (1 hunks)
  • animation_controllers/cloningMachine/containment_chamber.json (1 hunks)
  • animation_controllers/cloningMachine/containment_chamber_liquid.json (1 hunks)
  • animation_controllers/cloningMachine/dna_scanner.json (1 hunks)
  • animations/cloningMachine/battery_holder.animation.json (1 hunks)
  • animations/cloningMachine/battery_holder_pipe.animation.json (1 hunks)
  • animations/cloningMachine/containment_chamber.animation.json (1 hunks)
  • animations/cloningMachine/containment_chamber_liquid.animation.json (1 hunks)
  • animations/cloningMachine/cooling_station.animation.json (1 hunks)
  • animations/item_holder.animation.json (1 hunks)
  • entity/cloningMachine/battery_holder.json (1 hunks)
  • entity/cloningMachine/containment_chamber.json (1 hunks)
  • entity/cloningMachine/containment_chamber_liquid.json (1 hunks)
  • entity/cloningMachine/cooling_station.json (1 hunks)
  • entity/cloningMachine/dna_scanner.json (1 hunks)
  • entity/cloningMachine/pipes/battery_holder_pipe.json (1 hunks)
  • entity/cloningMachine/pipes/cooling_station_pipe.json (1 hunks)
  • entity/cloningMachine/pipes/dna_scanner_pipe.json (1 hunks)
  • entity/item_holder.json (1 hunks)
  • entity/trainer.json (1 hunks)
  • models/entity/cloningMachine/battery_holder.geo.json (1 hunks)
  • models/entity/cloningMachine/battery_holder_pipe.geo.json (1 hunks)
  • models/entity/cloningMachine/containment_chamber_liquid.geo.json (1 hunks)
  • models/entity/cloningMachine/cooling_station.geo.json (1 hunks)
  • models/entity/cloningMachine/cooling_station_pipe.geo.json (1 hunks)
  • models/entity/cloningMachine/dna_scanner_pipe.geo.json (1 hunks)
  • models/entity/item_holder.geo.json (1 hunks)
  • particles/disinfect.particle.json (1 hunks)
  • textures/item_texture.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (18)
  • animation_controllers/cloningMachine/battery_holder_pipe.json
  • entity/trainer.json
  • entity/cloningMachine/cooling_station.json
  • models/entity/cloningMachine/battery_holder.geo.json
  • animations/item_holder.animation.json
  • entity/cloningMachine/battery_holder.json
  • entity/cloningMachine/containment_chamber_liquid.json
  • entity/cloningMachine/containment_chamber.json
  • animations/cloningMachine/cooling_station.animation.json
  • models/entity/cloningMachine/containment_chamber_liquid.geo.json
  • entity/cloningMachine/dna_scanner.json
  • entity/cloningMachine/pipes/battery_holder_pipe.json
  • animations/cloningMachine/containment_chamber_liquid.animation.json
  • animation_controllers/cloningMachine/dna_scanner.json
  • animations/cloningMachine/battery_holder.animation.json
  • entity/item_holder.json
  • animation_controllers/cloningMachine/containment_chamber.json
  • textures/item_texture.json
🔇 Additional comments (11)
models/entity/item_holder.geo.json (1)

9-11: Verify visible bounds accommodate new animations and scaling.

The visible bounds adjustments (width: 1→2, height: 1→1.5, offset +0.25 on Y) are reasonable given the PR adds idle animations and scaling to this entity. However, confirm these bounds are sufficient to contain the full animation range and any scaling transformations, especially during animated rotations or scale changes referenced in entity/item_holder.json.

To verify the bounds are correct:

  1. Check the actual bone geometry dimensions (cubes in this file, not shown in the diff)
  2. Simulate the idle animation to ensure no part of the scaled/animated item extends beyond the new visible bounds
  3. Confirm the Y-offset of 0.25 properly centers the bounds accounting for animation motion
models/entity/cloningMachine/dna_scanner_pipe.geo.json (1)

1-267: Geometry asset is well-formed.

The geometry definition is structurally sound with proper bone hierarchy, pivot points, rotations, and complete UV mappings across all cube faces. However, note that this asset's visual correctness depends on the texture path issue in entity/cloningMachine/pipes/dna_scanner_pipe.json being resolved first.

animations/cloningMachine/battery_holder_pipe.animation.json (1)

1-266: Animation structure is well-formed with proper bone targeting and timing.

The file correctly defines four animations with consistent bone references (bone56, bone54, bone57, bone55) that align with the geometry model. Keyframe timing is precise, with final keyframes properly bounded at or near each animation's total length. The use of pre/post transitions for easing is a good practice.

Ensure the animation controller at animation_controllers/cloningMachine/battery_holder_pipe.json references these four animations and maps them to the correct state machine transitions (e.g., via pokeb:batteries property as mentioned in the enriched summary).

models/entity/cloningMachine/battery_holder_pipe.geo.json (1)

1-996: Geometry structure properly supports animation and follows Bedrock model conventions.

The bone hierarchy is well-designed with all animated bones correctly present. The hierarchical tree (root → bone37/35/34 → animated children) enables the animation system to apply transforms appropriately. UV mappings are consistent with per-face coordinates properly bounded within the 1024×1024 texture, and the use of negative uv_size for "down" faces correctly flips UVs per Bedrock conventions. The selective use of inflate: 0.01 on certain cubes is appropriate for preventing z-fighting in overlapping geometry.

Verify that the client entity at entity/cloningMachine/pipes/battery_holder_pipe.json correctly references geometry.battery_holder_pipe and that all geometry bones are bound to the animation controller defined in animation_controllers/cloningMachine/battery_holder_pipe.json.

entity/cloningMachine/pipes/cooling_station_pipe.json (3)

9-10: Verify texture path is intentional for cooling_station_pipe.

The entity references "textures/entity/containment_chamber" rather than a cooling-station-specific texture. Confirm this texture asset reuse is intentional.


6-7: Confirm "zombie" material is the intended choice.

The material is set to "zombie" rather than a default or custom material. Verify this is intentional for the desired visual rendering.


15-20: No animation controller defined—confirm static entity is intended.

The entity definition includes no animation_controller in the description, meaning the cooling station pipe will not animate. The PR summary mentions cooling station animations exist. Verify whether this entity should include an animation controller or remain static.

models/entity/cloningMachine/cooling_station.geo.json (2)

1-12: Geometry structure is well-formed. JSON syntax is valid, format version is appropriate, and texture dimensions (1024×1024) are standard for complex models. Visible bounds and pivot positioning look reasonable for a cooling station structure.


232-250: No animation files exist for cooling_station—bone53 is static geometry. Verification confirms bone53 in cooling_station.geo.json:233 is defined only as static geometry. Unlike other entities (e.g., archeops), the cloningMachine cooling_station entity has no associated animation files. The zero-height plane [17, 0, 8] is intentional static geometry, likely for visual layering in the model structure.

particles/disinfect.particle.json (2)

12-42: Particle physics and lifecycle configuration looks solid.

The emitter configuration (spawn_rate 37, max_particles 100) and particle lifecycle (1-second lifetime with 1-second active emitter time) create a steady, looping disinfect effect. The disc emission shape and downward direction/acceleration (-6 linear_acceleration) are well-suited for a disinfecting particle that spreads and falls.


49-69: No issues found—configuration is optimal.

The texture dimensions (16×128) match the configuration exactly. With 8×8 frames and step_UV [0, 16] (vertical stepping), the 2×2 base_UV randomization creates 4 distinct animation sequences, each using 8 frames across the full 16×128 texture. All 32 frame slots are utilized efficiently, and the animation will render without errors or visual glitches. The particle effect is ready as-is.

Comment on lines +1 to +74
{
"format_version": "1.18.3",
"animation_controllers": {
"controller.animation.battery_holder": {
"initial_state": "empty",
"states": {
"empty": {
"animations": [
"empty"
],
"transitions": [
{
"one": "q.property('pokeb:batteries') == 1"
},
{
"two": "q.property('pokeb:batteries') == 2"
},
{
"three": "q.property('pokeb:batteries') == 3"
}
]
},
"one": {
"animations": [
"one"
],
"transitions": [
{
"empty": "q.property('pokeb:batteries') == 0"
},
{
"two": "q.property('pokeb:batteries') == 2"
},
{
"three": "q.property('pokeb:batteries') == 3"
}
]
},
"two": {
"animations": [
"two"
],
"transitions": [
{
"empty": "q.property('pokeb:batteries') == 0"
},
{
"one": "q.property('pokeb:batteries') == 1"
},
{
"three": "q.property('pokeb:batteries') == 3"
}
]
},
"three": {
"animations": [
"three"
],
"transitions": [
{
"empty": "q.property('pokeb:batteries') == 0"
},
{
"one": "q.property('pokeb:batteries') == 1"
},
{
"two": "q.property('pokeb:batteries') == 2"
}
]
}
}
}
}
} No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Well-structured animation state machine with complete transition coverage.

The animation controller defines a four-state machine (empty, one, two, three) with full bidirectional transitions driven by the pokeb:batteries property. The structure is consistent and logically sound—each state transitions to the other three when the property matches the corresponding value.

However, verify the following dependencies:

  1. Animation names (lines 9, 25, 41, 57): Confirm that animations named "empty", "one", "two", and "three" exist and are defined in animations/cloningMachine/battery_holder.animation.json.
  2. Property setup (lines 13, 16, 19, etc.): Verify that the entity referencing this controller (entity/cloningMachine/battery_holder.json) properly initializes and updates the pokeb:batteries property.
  3. Edge case handling: If pokeb:batteries can take values outside the range [0, 3], the controller will remain in its current state indefinitely. Confirm this is the intended behavior or add a fallback transition if needed.

Run this script to verify the animation references:


🏁 Script executed:

#!/bin/bash
# Verify animation definitions exist for battery_holder animations

# Check if the animations file exists and contains the required animation names
if [ -f "animations/cloningMachine/battery_holder.animation.json" ]; then
  echo "✓ Animation file found"
  # Extract animation names
  rg -o '"(empty|one|two|three)":\s*\{' animations/cloningMachine/battery_holder.animation.json | wc -l
else
  echo "✗ Animation file not found"
fi

# Check entity file references this controller
rg -n 'battery_holder' entity/cloningMachine/battery_holder.json | head -10

Length of output: 443


I need to inspect the actual content of the animation file to understand why the animation names weren't found.


🏁 Script executed:

#!/bin/bash
# Inspect the animation file content to verify animation definitions
echo "=== Animation file content (first 100 lines) ==="
head -100 animations/cloningMachine/battery_holder.animation.json

echo -e "\n=== Animation file length ==="
wc -l animations/cloningMachine/battery_holder.animation.json

echo -e "\n=== Search for animation object keys ==="
rg -n '"animations"' animations/cloningMachine/battery_holder.animation.json

Length of output: 419


The animation file doesn't exist at the assumed path. Let me search for where animation files are actually located.


---

🏁 Script executed:

```shell
#!/bin/bash
# Search for animation files related to battery_holder
echo "=== Searching for battery_holder animation files ==="
fd -t f 'battery_holder.*animation' --case-sensitive

echo -e "\n=== Searching for any .animation.json files ==="
fd -t f '\.animation\.json$' | head -20

echo -e "\n=== Searching for 'animations' directories ==="
fd -t d 'animations' --case-sensitive | head -10

Length of output: 1152


Now that the file location is confirmed, let me inspect its content to verify the animation definitions exist.


---

🏁 Script executed:

```shell
#!/bin/bash
# Read animation file to verify animation definitions
echo "=== Animation file content ==="
cat animations/cloningMachine/battery_holder.animation.json

echo -e "\n=== Verify animation names in controller ==="
rg -n '"(empty|one|two|three)"' animations/cloningMachine/battery_holder.animation.json

Length of output: 5423


Now let me verify that the entity file has complete animation mappings for all four animation names.


---

🏁 Script executed:

```shell
#!/bin/bash
# Check entity file for complete animation mappings
echo "=== Entity file animation mappings section ==="
rg -A 10 '"animations"' entity/cloningMachine/battery_holder.json | head -20

echo -e "\n=== Verify all 4 animation mappings exist ==="
rg -c '"empty"|"one"|"two"|"three"' entity/cloningMachine/battery_holder.json

echo -e "\n=== Check property initialization ==="
rg -n 'pokeb:batteries' entity/cloningMachine/battery_holder.json

Length of output: 577


The property pokeb:batteries is not appearing in the output. Let me check if it's initialized through entity components or elsewhere in the entity file.


---

🏁 Script executed:

```shell
#!/bin/bash
# Check full entity file structure for property initialization
echo "=== Full entity file content ==="
cat entity/cloningMachine/battery_holder.json

echo -e "\n=== Search for any property/component initialization ==="
rg -i 'component|property' entity/cloningMachine/battery_holder.json

Length of output: 1113


The file shown is a client-side entity. Properties are typically defined in behavior entity files. Let me search for a behavior entity file.


---

🏁 Script executed:

```shell
#!/bin/bash
# Search for behavior entity files for battery_holder
echo "=== Search for behavior entity files ==="
fd -t f 'battery_holder' | grep -i entity

echo -e "\n=== Search for any behavior pack directories ==="
fd -t d 'behavior' | head -10

echo -e "\n=== Search for all entity files in behavior directories ==="
find . -path '*/entities/*battery_holder*' 2>/dev/null

Length of output: 381


Let me search the entire codebase for where the pokeb:batteries property is being set or initialized.


---

🏁 Script executed:

```shell
#!/bin/bash
# Search for all references to pokeb:batteries property
echo "=== All references to pokeb:batteries ==="
rg -r 'pokeb:batteries' --type-list | head -5
rg -n 'pokeb:batteries' 

echo -e "\n=== Search for property setting mechanisms ==="
rg -n 'property.*batteries|batteries.*property' 

echo -e "\n=== Check behavior scripts directory ==="
ls -la scripts/data/behaviors/ 2>/dev/null || echo "Directory empty or missing"

Length of output: 6974


Critical issue: pokeb:batteries property is never initialized, causing animation controller to malfunction.

The animation controller structure is correct and all animation references exist, but the implementation is incomplete:

  • Animation definitions ✓: All four animations (empty, one, two, three) are properly defined in animations/cloningMachine/battery_holder.animation.json
  • Animation mappings ✓: Entity file correctly maps animation names to full animation definitions
  • Property initialization ✗: The pokeb:batteries property referenced in all transition conditions is never initialized anywhere in the codebase

Without initialization, the property will remain undefined and the animation controller will remain stuck in the "empty" state indefinitely. All transition conditions will fail to match.

Add property initialization to the entity's component section or create a behavior entity file that sets pokeb:batteries to values 0-3.

🤖 Prompt for AI Agents
In animation_controllers/cloningMachine/battery_holder.json lines 1-74: the
controller references q.property('pokeb:batteries') but that property is never
initialized; add initialization so the controller can transition. Fix by adding
a pokeb:batteries component/property with a default value (0) to the entity's
components section or create a behavior/behavior_pack entity that defines
pokeb:batteries (integer) and sets its initial value to 0 and bounds/valid
values 0–3; ensure the property is synced/available to the animation controller
and any code that updates it so transitions can evaluate correctly.

Comment on lines +1485 to +1522
"glassparticle1": {
"rotation": {
"6.2917": [0, "(query.anim_time*240)", 0],
"6.5417": [0, "(query.anim_time*240)", 0],
"6.625": [0, 0, 0]
},
"position": {
"6.25": [237, -25, 104],
"6.3333": [247, -35, 66],
"6.4167": [255, -51, 59],
"6.5": [261, -80, 59],
"6.5833": [261, -98, 53]
},
"scale": {
"0.0": [0, 0, 0],
"6.2083": {
"pre": [0, 0, 0],
"post": [0, 0, 0]
},
"6.25": {
"pre": [0, 0, 0],
"post": [0.5, 0.5, 0.5]
},
"6.2917": {
"pre": [0.5, 0.5, 0.5],
"post": [1.2, 1.2, 1.2]
},
"6.625": {
"pre": [1.2, 1.2, 1.2],
"post": [0, 0, 0]
}
}
},
"glassparticle2": {
"rotation": {
"6.2917": [0, "(query.anim_time*360)", 0],
"6.5417": [0, "(query.anim_time*360)", 0],
"6.625": [0, 0, 0]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Query expressions in rotation fields are not valid animation format.

Lines 1487–1488 and 1520–1521 use string expressions like "(query.anim_time*240)" in rotation arrays, but the Bedrock animation format requires numeric [x, y, z] values. Query expressions belong in scripting contexts, not animation keyframes. This will fail to parse or animate.

Replace the query expressions with static rotation values:

 "glassparticle1": {
   "rotation": {
-    "6.2917": [0, "(query.anim_time*240)", 0],
-    "6.5417": [0, "(query.anim_time*240)", 0],
+    "6.2917": [0, 0, 0],
+    "6.5417": [0, 0, 0],
     "6.625": [0, 0, 0]
   },

If dynamic rotation is intended, you'll need to use a script or animation controller with state-driven keyframes instead of query expressions.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"glassparticle1": {
"rotation": {
"6.2917": [0, "(query.anim_time*240)", 0],
"6.5417": [0, "(query.anim_time*240)", 0],
"6.625": [0, 0, 0]
},
"position": {
"6.25": [237, -25, 104],
"6.3333": [247, -35, 66],
"6.4167": [255, -51, 59],
"6.5": [261, -80, 59],
"6.5833": [261, -98, 53]
},
"scale": {
"0.0": [0, 0, 0],
"6.2083": {
"pre": [0, 0, 0],
"post": [0, 0, 0]
},
"6.25": {
"pre": [0, 0, 0],
"post": [0.5, 0.5, 0.5]
},
"6.2917": {
"pre": [0.5, 0.5, 0.5],
"post": [1.2, 1.2, 1.2]
},
"6.625": {
"pre": [1.2, 1.2, 1.2],
"post": [0, 0, 0]
}
}
},
"glassparticle2": {
"rotation": {
"6.2917": [0, "(query.anim_time*360)", 0],
"6.5417": [0, "(query.anim_time*360)", 0],
"6.625": [0, 0, 0]
"glassparticle1": {
"rotation": {
"6.2917": [0, 0, 0],
"6.5417": [0, 0, 0],
"6.625": [0, 0, 0]
},
"position": {
"6.25": [237, -25, 104],
"6.3333": [247, -35, 66],
"6.4167": [255, -51, 59],
"6.5": [261, -80, 59],
"6.5833": [261, -98, 53]
},
"scale": {
"0.0": [0, 0, 0],
"6.2083": {
"pre": [0, 0, 0],
"post": [0, 0, 0]
},
"6.25": {
"pre": [0, 0, 0],
"post": [0.5, 0.5, 0.5]
},
"6.2917": {
"pre": [0.5, 0.5, 0.5],
"post": [1.2, 1.2, 1.2]
},
"6.625": {
"pre": [1.2, 1.2, 1.2],
"post": [0, 0, 0]
}
}
},
"glassparticle2": {
"rotation": {
"6.2917": [0, 0, 0],
"6.5417": [0, 0, 0],
"6.625": [0, 0, 0]
🤖 Prompt for AI Agents
In animations/cloningMachine/containment_chamber.animation.json around lines
1485 to 1522 the rotation keyframes for glassparticle1 and glassparticle2
contain string query expressions like "(query.anim_time*240)" and
"(query.anim_time*360)" which are invalid in Bedrock animation keyframes;
replace those string expressions with concrete numeric rotation values (degrees
or radians as used elsewhere in the file) for each keyframe, or remove the
dynamic entries and implement the intended dynamic rotation via a script or
animation controller that updates the entity rotation at runtime instead of
embedding query expressions in the JSON.

Comment on lines +1735 to +1784
"animation.containment_chamber.empty": {
"loop": "hold_on_last_frame",
"bones": {
"floorwater": {
"scale": 0
},
"Door": {
"rotation": [0, 0, 0]
},
"Door2": {
"scale": 0
},
"Door3": {
"scale": 0
},
"Door4": {
"scale": 0
},
"water": {
"scale": 0
},
"water2": {
"scale": 0
},
"water3": {
"scale": 0
},
"water4": {
"scale": 0
},
"water5": {
"scale": 0
},
"bubbles": {
"scale": 0
},
"ditto": {
"scale": 0
},
"drop3": {
"scale": 0
},
"waterparticles": {
"scale": 0
},
"glassparticles": {
"scale": 0
}
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Missing animation_length in the "empty" animation.

The animation.containment_chamber.empty animation (line 1735) does not declare animation_length, while all other animations in this file do. This will likely cause the animation to fail validation or behave unpredictably at runtime.

Add animation_length after the "loop" property:

 "animation.containment_chamber.empty": {
   "loop": "hold_on_last_frame",
+  "animation_length": 1,
   "bones": {

(Use 0 if this is an instant/no-op state, or 1 for a single-frame hold.)

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"animation.containment_chamber.empty": {
"loop": "hold_on_last_frame",
"bones": {
"floorwater": {
"scale": 0
},
"Door": {
"rotation": [0, 0, 0]
},
"Door2": {
"scale": 0
},
"Door3": {
"scale": 0
},
"Door4": {
"scale": 0
},
"water": {
"scale": 0
},
"water2": {
"scale": 0
},
"water3": {
"scale": 0
},
"water4": {
"scale": 0
},
"water5": {
"scale": 0
},
"bubbles": {
"scale": 0
},
"ditto": {
"scale": 0
},
"drop3": {
"scale": 0
},
"waterparticles": {
"scale": 0
},
"glassparticles": {
"scale": 0
}
}
}
"animation.containment_chamber.empty": {
"loop": "hold_on_last_frame",
"animation_length": 1,
"bones": {
"floorwater": {
"scale": 0
},
"Door": {
"rotation": [0, 0, 0]
},
"Door2": {
"scale": 0
},
"Door3": {
"scale": 0
},
"Door4": {
"scale": 0
},
"water": {
"scale": 0
},
"water2": {
"scale": 0
},
"water3": {
"scale": 0
},
"water4": {
"scale": 0
},
"water5": {
"scale": 0
},
"bubbles": {
"scale": 0
},
"ditto": {
"scale": 0
},
"drop3": {
"scale": 0
},
"waterparticles": {
"scale": 0
},
"glassparticles": {
"scale": 0
}
}
}
🤖 Prompt for AI Agents
In animations/cloningMachine/containment_chamber.animation.json around lines
1735 to 1784 the "animation.containment_chamber.empty" block is missing the
required "animation_length" property; add "animation_length" immediately after
the "loop" property and set it to 0 for an instant/no-op state (or 1 if you want
a single-frame hold) so the animation validates and behaves consistently with
the other animations.

Comment on lines +121 to +130
"down": {
"uv": [
56,
513
],
"uv_size": [
3,
-5
]
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Systemic issue: All "down" faces use negative UV heights—fix before merge.

This is the issue previously flagged on line 344 but appears systematically across nearly every bone in the file. Bedrock geometry treats negative uv_size dimensions as texture mirror/warp operations, causing rendering artifacts. The pattern affects ~27 cubes:

  • bone5 (line 128): "down": { "uv": [56, 513], "uv_size": [3, -5] }
  • bone6 (line 218): "down": { "uv": [238, 550], "uv_size": [5, -3] }
  • bone8 (line 398): "down": { "uv": [554, 424], "uv_size": [8, -3] }
  • …and continues through bone31 (line 2524)

All require correction. Change each down face's uv_size to use positive height and adjust the UV origin Y coordinate if the visual orientation must remain unchanged.


Representative fix for bone5:

                "down": {
                  "uv": [
-                   56,
+                   56,
                    513
                  ],
                  "uv_size": [
                    3,
-                   -5
+                   5
                  ]
                }

If the texture mapping visually changes, swap the UV origin Y to preserve appearance.

Also applies to: 211-220, 301-310, 391-400, 482-491, 572-581, 663-672, 753-762, 853-862, 953-962, 1043-1052, 1133-1142, 1224-1233, 1314-1323, 1404-1413, 1495-1504, 1585-1594, 1685-1694, 1785-1794, 1875-1884, 1965-1974, 2055-2064, 2146-2155, 2237-2246, 2328-2337, 2418-2426, 2518-2526

🤖 Prompt for AI Agents
In models/entity/cloningMachine/cooling_station_pipe.geo.json around lines
121-130 (and the other listed ranges), the "down" face uses a negative uv_size
height (e.g., "uv_size": [3, -5]); change the second value to its absolute
(positive) value and, to preserve current visual orientation, adjust the uv Y
origin by subtracting that positive height (e.g., new_uv_size = [w, h];
new_uv[1] = old_uv[1] - h). Apply this fix to every "down" face flagged (all
bones listed and the ranges: 211-220, 301-310, 391-400, 482-491, 572-581,
663-672, 753-762, 853-862, 953-962, 1043-1052, 1133-1142, 1224-1233, 1314-1323,
1404-1413, 1495-1504, 1585-1594, 1685-1694, 1785-1794, 1875-1884, 1965-1974,
2055-2064, 2146-2155, 2237-2246, 2328-2337, 2418-2426, 2518-2526).

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
animations/cloningMachine/dna_scanner.animation.json (2)

4-465: Substantial duplication across idle, opening, and closing animations.

The idle_open (lines 4–234), idle_closed (lines 235–465), opening (lines 1038–1271), and closing (lines 1272–1505) animations share nearly identical bone keyframe structures for green, green1–5, green2–4. The only material differences are in bone39 rotation values. Consider whether this repetition could be reduced through shared keyframe data or animation layering if the engine supports it.


466-1024: Error animation contains highly repetitive keyframes; verify necessity.

The red2 bone (lines 499–698) and red4 bone (lines 846–1022) repeat alternating [0, 0, 0] and [0, 0, -1] position keyframes at 0.25-second intervals over ~11 seconds. This produces 44+ nearly identical keyframe entries. Similarly, red3 (lines 736–815) follows a 0.5-second pattern. If this is intended to represent a rapid flickering effect, consider whether the animation length and interval precision can be simplified or if this level of granularity is necessary for the intended visual output.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 83742cd and abc80aa.

📒 Files selected for processing (3)
  • animations/cloningMachine/cooling_station.animation.json (1 hunks)
  • animations/cloningMachine/dna_scanner.animation.json (1 hunks)
  • models/entity/cloningMachine/cooling_station.geo.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • animations/cloningMachine/cooling_station.animation.json
  • models/entity/cloningMachine/cooling_station.geo.json
🔇 Additional comments (2)
animations/cloningMachine/dna_scanner.animation.json (2)

235-465: Verify intent: idle_open and idle_closed have identical bone keyframes.

Both animations have identical position keyframes for green/green1–5 bones but differ only in bone39 rotation (idle_open: [0, -90, 0] at line 231 vs. idle_closed: [0, 0, 0] at line 462). If these are meant to represent meaningfully different states (open vs. closed), consider whether the green bone animations should also differ, or if the naming is misleading.


1025-1037: All referenced bones are properly defined in the model geometry.

Verification confirms that all bones referenced in the animation file (deadlylazer, green, green1green5, red, red2red4, red3, and bone39) are defined in ./models/entity/cloningMachine/dna_scanner.geo.json. No animation binding errors will occur at runtime.

@smell-of-curry smell-of-curry force-pushed the feature/mewtwo-update branch 2 times, most recently from 4066f06 to 64e1f50 Compare November 24, 2025 18:26

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (6)
entity/cloningMachine/cooling_station.json (2)

9-14: Fix texture reference — still pointing to wrong asset.

This unresolved critical issue from the previous review persists: the textures.default still references textures/entity/containment_chamber instead of the correct textures/items/cooling_station. The geometry will render with the wrong texture atlas.

             "textures": {
-                "default": "textures/entity/containment_chamber"
+                "default": "textures/items/cooling_station"
             },

16-23: Initialize variable.liquid_amount in pre_animation — still missing.

This unresolved major issue from the previous review persists: the pre_animation block sets potion_amount and has_fluid, but never initializes variable.liquid_amount. Animations that scale water6 with this variable will fail, and the fluid column won't appear during potion cycles.

                 "pre_animation": [
                     "variable.potion_amount = query.property('pokeb:potion_amount');",
-                    "variable.has_fluid = query.property('pokeb:has_fluid');"
+                    "variable.has_fluid = query.property('pokeb:has_fluid');",
+                    "variable.liquid_amount = query.property('pokeb:liquid_amount');"
                 ],
animation_controllers/cloningMachine/battery_holder.json (1)

1-74: [DUPLICATE] Property initialization still missing—pokeb:batteries never set.

As flagged in the previous review, the animation controller references q.property('pokeb:batteries') in all transition conditions (lines 13, 16, 19, etc.), but this property is never initialized anywhere in the codebase. The entity will remain stuck in the "empty" state indefinitely since all transition conditions will fail to match.

Ensure the pokeb:batteries property is initialized and updated by the behavior entity or script that manages the battery_holder. This is a blocker for the feature to function.

animation_controllers/cloningMachine/containment_chamber_liquid.json (1)

6-886: [DUPLICATE] Missing fill_16 state—animation has no matching controller state.

The accompanying animation file defines water_fill16, but this controller only includes states fill_0 through fill_15. If variable.fluid_amount is set to 16, the controller will not transition to a fill_16 state, and the final animation will never play. This blocks full utilization of the animation set.

Add a fill_16 state with "animations": ["water_fill16"] and update every existing state's transitions to include a branch for "fill_16": "variable.fluid_amount == 16" so the controller covers the full 0–16 range.

animations/cloningMachine/containment_chamber.animation.json (2)

1485-1550: [DUPLICATE] Query expressions in rotation keyframes are invalid Bedrock animation format.

Lines 1487–1488 and 1520–1521 embed string query expressions like "(query.anim_time*240)" and "(query.anim_time*360)" directly in rotation arrays, but the Bedrock animation format requires numeric [x, y, z] values. These will fail to parse or animate at runtime.

Replace query expressions with static numeric rotation values. If dynamic rotation is required, implement it via script or state-driven animation sequences instead of query expressions in keyframes.

Apply this diff:

 "glassparticle1": {
   "rotation": {
-    "6.2917": [0, "(query.anim_time*240)", 0],
-    "6.5417": [0, "(query.anim_time*240)", 0],
+    "6.2917": [0, 0, 0],
+    "6.5417": [0, 0, 0],
     "6.625": [0, 0, 0]
   },
 "glassparticle2": {
   "rotation": {
-    "6.2917": [0, "(query.anim_time*360)", 0],
-    "6.5417": [0, "(query.anim_time*360)", 0],
+    "6.2917": [0, 0, 0],
+    "6.5417": [0, 0, 0],
     "6.625": [0, 0, 0]
   },

1735-1784: [DUPLICATE] Missing required animation_length in empty animation.

The animation.containment_chamber.empty animation declares loop: "hold_on_last_frame" but omits the animation_length property. All other animations in this file include it. This will cause validation failure or undefined runtime behavior.

Add animation_length immediately after the loop property. Use 0 for an instant/no-op state or 1 for a single-frame hold:

 "animation.containment_chamber.empty": {
   "loop": "hold_on_last_frame",
+  "animation_length": 0,
   "bones": {
🧹 Nitpick comments (1)
animations/cloningMachine/dna_scanner.animation.json (1)

4-234: Significant code duplication across idle and transition animations.

The idle_open, idle_closed, opening, and closing animations share nearly identical bone keyframe structures. Each animation contains 5 "green" bones (green, green1–5) with identical temporal keyframe patterns (0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.5, 4.0 seconds) and identical interpolation (pre/post) logic, differing only in Z-position values (oscillating between 0, ±1).

For instance, the green bone position timeline spans lines 9–43 (idle_open), 240–274 (idle_closed), 1043–1077 (opening), and 1276–1310 (closing), with negligible variation.

While JSON resource files have limited abstraction mechanisms in Bedrock, this duplication makes maintenance difficult. Any timing or interpolation logic corrections must be replicated across all four animations.

If tooling permits, consider generating these animations programmatically (e.g., via JSON templating or a build script) to reduce manual maintenance burden and ensure consistency. If not feasible, document the intentional mirroring in a README or inline comment to clarify why the repetition exists.

Also applies to: 235-465, 1038-1271, 1272-1505

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between abc80aa and 64e1f50.

📒 Files selected for processing (23)
  • animation_controllers/cloningMachine/battery_holder.json (1 hunks)
  • animation_controllers/cloningMachine/battery_holder_pipe.json (1 hunks)
  • animation_controllers/cloningMachine/containment_chamber.json (1 hunks)
  • animation_controllers/cloningMachine/containment_chamber_liquid.json (1 hunks)
  • animation_controllers/cloningMachine/dna_scanner.json (1 hunks)
  • animations/cloningMachine/battery_holder.animation.json (1 hunks)
  • animations/cloningMachine/battery_holder_pipe.animation.json (1 hunks)
  • animations/cloningMachine/containment_chamber.animation.json (1 hunks)
  • animations/cloningMachine/containment_chamber_liquid.animation.json (1 hunks)
  • animations/cloningMachine/cooling_station.animation.json (1 hunks)
  • animations/cloningMachine/dna_scanner.animation.json (1 hunks)
  • animations/item_holder.animation.json (1 hunks)
  • entity/cloningMachine/battery_holder.json (1 hunks)
  • entity/cloningMachine/contained_mewtwo.json (1 hunks)
  • entity/cloningMachine/containment_chamber.json (1 hunks)
  • entity/cloningMachine/containment_chamber_liquid.json (1 hunks)
  • entity/cloningMachine/cooling_station.json (1 hunks)
  • entity/cloningMachine/dna_scanner.json (1 hunks)
  • entity/cloningMachine/pipes/battery_holder_pipe.json (1 hunks)
  • entity/cloningMachine/pipes/cooling_station_pipe.json (1 hunks)
  • entity/cloningMachine/pipes/dna_scanner_pipe.json (1 hunks)
  • entity/contained_mewtwo.json (1 hunks)
  • entity/item_holder.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (14)
  • animations/cloningMachine/battery_holder.animation.json
  • animation_controllers/cloningMachine/battery_holder_pipe.json
  • animation_controllers/cloningMachine/dna_scanner.json
  • entity/cloningMachine/pipes/cooling_station_pipe.json
  • entity/cloningMachine/battery_holder.json
  • entity/cloningMachine/pipes/dna_scanner_pipe.json
  • animations/cloningMachine/battery_holder_pipe.animation.json
  • entity/cloningMachine/dna_scanner.json
  • entity/item_holder.json
  • entity/cloningMachine/pipes/battery_holder_pipe.json
  • entity/contained_mewtwo.json
  • animations/item_holder.animation.json
  • entity/cloningMachine/contained_mewtwo.json
  • animations/cloningMachine/cooling_station.animation.json
🔇 Additional comments (7)
animations/cloningMachine/dna_scanner.animation.json (3)

1-1520: Animation definitions and state transitions are well-structured.

The JSON structure is valid and animations are logically sound:

  • Loop and hold semantics are appropriate: idle_* animations loop; opening, closing, and error use hold_on_last_frame.
  • Bone39 rotations correctly manage state transitions: idle_open (−90°) ↔ idle_closed (0°), with opening and closing animating the transitions smoothly.
  • The scan and shake animations are succinct and fit their intended purposes.
  • Timing is reasonable (12s error, 4s idle/transitions, 3s scan, 0.12s shake).

1025-1037: Verify that scan animation timing aligns with intended gameplay.

The scan animation moves the deadlylazer bone from [0, 0, 0] to [−18, 0, 0] over 3 seconds (lines 1030–1033). Confirm this timing and magnitude are intended and match gameplay expectations (e.g., duration of a DNA scan operation).


1498-1503: Verify bone39 closure rotation transition.

The closing animation interpolates bone39 rotation from [0, −90, 0] (line 1500) to [0, 0, 0] (line 1501) over 0.5 seconds. Confirm this brief transition is intentional and visually appropriate for the closure motion.

animations/cloningMachine/containment_chamber_liquid.animation.json (1)

1-1438: Animation definitions are well-formed and complete.

All 17 water fill animations (water_fill0–water_fill16) and the breaking animation are properly defined with animation_length, loop behavior, and bone keyframes. Each animation transitions smoothly between fill states with proper pre/post keyframe handling.

entity/cloningMachine/containment_chamber_liquid.json (1)

12-39: Entity structure is sound; animation mappings align with controller.

The pre_animation script correctly queries pokeb:fluid_amount and stores it in variable.fluid_amount for controller evaluation. Animation mappings for water_fill0–water_fill15 are properly defined and wired to the controller states.

Once the controller's fill_16 state is added, update this file's animations section to include "water_fill16": "animation.containment_chamber_liquid.water_fill16" for completeness.

Verify that water_fill16 animation mapping will be added when controller is updated to support fill_16 state.

entity/cloningMachine/containment_chamber.json (1)

1-35: Entity configuration is well-structured.

The containment chamber entity properly wires the animation controller and all state-driven animations (empty, filling, breaking, opening, opening_ditto, closing). Geometry, material, and texture references are all in place.

animation_controllers/cloningMachine/containment_chamber.json (1)

1-142: Controller state machine is well-designed and complete.

Six states (empty, filling, breaking, opening, opening_ditto, closing) with full bidirectional transitions enable flexible state-driven animation control. Each transition is keyed to q.property('pokeb:state') with appropriate string comparisons. All animation references align with the animation definitions.

Update models and animations

add contained mewtwo

Add contained mewtwo
@smell-of-curry smell-of-curry force-pushed the feature/mewtwo-update branch from 64e1f50 to fa6d0b7 Compare June 17, 2026 16:30
@github-actions

Copy link
Copy Markdown

Minecraft Model Preview

Model Changes

Entity Before After
pokeb:battery_holder New model
pokeb:battery_holder_pipe New model
pokeb:containment_chamber New model
pokeb:containment_chamber_liquid New model
pokeb:cooling_station New model
pokeb:dna_scanner New model
pokeb:item_holder
pokeb:contained_mewtwo New model
pokeb:contained_mewtwo New model
pokemon:mewtwo
pokemon:mewtwo (shiny)
pokeb:cooling_station_pipe New model
pokeb:dna_scanner_pipe New model
pokeb:trainer

Animation Previews

Entity Animation Preview
pokeb:battery_holder animation.battery_holder.empty
pokeb:battery_holder animation.battery_holder.one
pokeb:battery_holder animation.battery_holder.three
pokeb:battery_holder animation.battery_holder.two
pokeb:battery_holder_pipe animation.battery_holder_pipe.idle
pokeb:battery_holder_pipe animation.battery_holder_pipe.run1
pokeb:battery_holder_pipe animation.battery_holder_pipe.run2
pokeb:battery_holder_pipe animation.battery_holder_pipe.run3
pokeb:containment_chamber animation.containment_chamber.breaking
pokeb:containment_chamber animation.containment_chamber.closing
pokeb:containment_chamber animation.containment_chamber.empty
pokeb:containment_chamber animation.containment_chamber.filling
pokeb:containment_chamber animation.containment_chamber.opening
pokeb:containment_chamber animation.containment_chamber.opening_ditto
pokeb:containment_chamber_liquid animation.containment_chamber_liquid.breaking
pokeb:containment_chamber_liquid animation.containment_chamber_liquid.water_fill0
pokeb:containment_chamber_liquid animation.containment_chamber_liquid.water_fill1
pokeb:containment_chamber_liquid animation.containment_chamber_liquid.water_fill10
pokeb:containment_chamber_liquid animation.containment_chamber_liquid.water_fill11
pokeb:containment_chamber_liquid animation.containment_chamber_liquid.water_fill12
pokeb:containment_chamber_liquid animation.containment_chamber_liquid.water_fill13
pokeb:containment_chamber_liquid animation.containment_chamber_liquid.water_fill14
pokeb:containment_chamber_liquid animation.containment_chamber_liquid.water_fill15
pokeb:containment_chamber_liquid animation.containment_chamber_liquid.water_fill16
pokeb:containment_chamber_liquid animation.containment_chamber_liquid.water_fill2
pokeb:containment_chamber_liquid animation.containment_chamber_liquid.water_fill3
pokeb:containment_chamber_liquid animation.containment_chamber_liquid.water_fill4
pokeb:containment_chamber_liquid animation.containment_chamber_liquid.water_fill5
pokeb:containment_chamber_liquid animation.containment_chamber_liquid.water_fill6
pokeb:containment_chamber_liquid animation.containment_chamber_liquid.water_fill7
pokeb:containment_chamber_liquid animation.containment_chamber_liquid.water_fill8
pokeb:containment_chamber_liquid animation.containment_chamber_liquid.water_fill9
pokeb:cooling_station animation.cooling_station.idle
pokeb:cooling_station animation.cooling_station.potion1
pokeb:cooling_station animation.cooling_station.potion2
pokeb:cooling_station animation.cooling_station.potion3
pokeb:cooling_station animation.cooling_station.shake
pokeb:dna_scanner animation.dna_scanner.closing
pokeb:dna_scanner animation.dna_scanner.error
pokeb:dna_scanner animation.dna_scanner.idle_closed
pokeb:dna_scanner animation.dna_scanner.idle_open
pokeb:dna_scanner animation.dna_scanner.opening
pokeb:dna_scanner animation.dna_scanner.scan
pokeb:dna_scanner animation.dna_scanner.shake
pokeb:item_holder animation.item_holder.idle
pokeb:item_holder animation.item_holder.shake
pokemon:mewtwo animation.mewtwo.air_idle
pokemon:mewtwo animation.mewtwo.attack
pokemon:mewtwo animation.mewtwo.battle_idle
pokemon:mewtwo animation.mewtwo.blink
pokemon:mewtwo animation.mewtwo.faint
pokemon:mewtwo animation.mewtwo.flying
pokemon:mewtwo animation.mewtwo.ground_idle
pokemon:mewtwo animation.mewtwo.rest
pokemon:mewtwo animation.mewtwo.sleeping
pokemon:mewtwo animation.mewtwo.swimming
pokemon:mewtwo animation.mewtwo.walking
pokemon:mewtwo animation.mewtwo.water_idle

github-actions Bot added a commit that referenced this pull request Jun 17, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (3)
animation_controllers/cloningMachine/containment_chamber.json (2)

4-140: 💤 Low value

Note: "idle" animation defined in entity but not used by this controller.

The entity file maps an "idle" animation key, but none of the six states in this controller reference it. If the animation is unused and not needed by the secondary controller.animation.containment_chamber_dirty controller, consider removing it to reduce maintenance burden.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@animation_controllers/cloningMachine/containment_chamber.json` around lines 4
- 140, The controller.animation.containment_chamber states (empty, filling,
breaking, opening, opening_ditto, closing) do not reference an "idle" animation
that is defined in the entity file. Before removing it, verify that the idle
animation is not used by the secondary
controller.animation.containment_chamber_dirty controller or referenced
elsewhere in the entity configuration. Once confirmed as unused, remove the idle
animation definition from the entity file to reduce maintenance burden.

11-137: ⚡ Quick win

Consider adding default state handling for robustness.

The state machine allows direct transitions between any two states based solely on pokeb:state property equality checks. If the server-side code sets pokeb:state to an unexpected value (typo, version mismatch, etc.), the entity will remain stuck in its current state with no visual feedback.

Consider adding a fallback transition or a default "error" state to handle unexpected property values gracefully.

💡 Example fallback pattern
"empty": {
  "animations": ["empty"],
  "transitions": [
    { "filling": "q.property('pokeb:state') == 'filling'" },
    { "breaking": "q.property('pokeb:state') == 'breaking'" },
    { "opening": "q.property('pokeb:state') == 'opening'" },
    { "opening_ditto": "q.property('pokeb:state') == 'opening_ditto'" },
    { "closing": "q.property('pokeb:state') == 'closing'" },
    { "error": "q.property('pokeb:state') != 'empty'" }
  ]
}

Then add an "error" state that plays a visual indicator or logs the issue.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@animation_controllers/cloningMachine/containment_chamber.json` around lines
11 - 137, The state machine definition in the transitions array for each state
(empty, filling, breaking, opening, opening_ditto, closing) lacks error handling
for unexpected pokeb:state values. Add a fallback transition to each state that
catches invalid or unexpected property values by adding a condition that
evaluates to true when the pokeb:state does not match any of the expected valid
values, and route those cases to a new "error" state. Then define the "error"
state with appropriate animations or visual feedback to gracefully handle
unexpected state values instead of leaving the entity stuck.
animations/cloningMachine/dna_scanner.animation.json (1)

466-1024: ⚖️ Poor tradeoff

Consider simplifying the error animation keyframes.

The error animation contains 558 lines with highly repetitive keyframe patterns. For example, red2 toggles between [0,0,0] and [0,0,-1] across 92 keyframes (lines 499-698). If the stepped blinking effect is essential, this verbosity is acceptable; however, if smoother interpolation or fewer steps would suffice, consolidating keyframes would improve maintainability.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@animations/cloningMachine/dna_scanner.animation.json` around lines 466 -
1024, The animation.dna_scanner.error animation contains excessive repetitive
keyframe definitions across its bones (red2, green, red3, red4, green1, green2,
green3) with hundreds of nearly identical position toggles between states like
[0,0,0] and [0,0,-1]. Review whether the stepped blinking effect requires all
these individual keyframes or if the animation can achieve the same visual
result with fewer, consolidated keyframes and smoother interpolation. Reduce the
keyframe count for each bone by grouping similar transitions and removing
redundant entries while preserving the intended animation behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@animation_controllers/cloningMachine/containment_chamber.json`:
- Around line 7-28: The containment_chamber animation controller file references
animations named "empty", "filling", and "opening_ditto" in state transitions,
but these animation keys are not defined in the animations section of the
entity/cloningMachine/containment_chamber.json file. To fix this, add the
missing animation mappings to the animations object in the entity file by
including entries for "empty", "filling", and "opening_ditto", each pointing to
their corresponding animation definitions (following the pattern of existing
animation mappings like "animation.containment_chamber.closing"). Verify that
the referenced animation definitions exist in the
animations/cloningMachine/containment_chamber.animation.json file.

In `@animations/cloningMachine/dna_scanner.animation.json`:
- Around line 235-465: The animation.dna_scanner.idle_closed animation contains
duplicated position keyframes for all green bones (green, green1, green2,
green3, green4, green5) that are identical to those in the idle_open animation,
with the only difference being the bone39 rotation value. To reduce this
~230-line duplication, explore extracting the shared position keyframes into a
separate base animation or use animation blending to separate the positional
blinking pattern from the rotation state, allowing both idle_open and
idle_closed to reference the same blinking animation while only differing in
their bone39 rotation configuration.
- Around line 1038-1505: The position keyframes for bones green, green1, green2,
green3, green4, and green5 are identical between animation.dna_scanner.opening
and animation.dna_scanner.closing, and this same pattern is repeated across
idle_open and idle_closed animations, resulting in approximately 690 lines of
duplication. Only the bone39 rotation keyframes differ between the opening and
closing states. Refactor the animation structure to consolidate these shared
position timelines into a reusable pattern or extract them into a separate
shared animation reference if the Bedrock animation system supports it, while
keeping only the unique bone39 rotation keyframes separate for each state. If
duplication is unavoidable due to Bedrock constraints, document the reason
clearly in comments.

---

Nitpick comments:
In `@animation_controllers/cloningMachine/containment_chamber.json`:
- Around line 4-140: The controller.animation.containment_chamber states (empty,
filling, breaking, opening, opening_ditto, closing) do not reference an "idle"
animation that is defined in the entity file. Before removing it, verify that
the idle animation is not used by the secondary
controller.animation.containment_chamber_dirty controller or referenced
elsewhere in the entity configuration. Once confirmed as unused, remove the idle
animation definition from the entity file to reduce maintenance burden.
- Around line 11-137: The state machine definition in the transitions array for
each state (empty, filling, breaking, opening, opening_ditto, closing) lacks
error handling for unexpected pokeb:state values. Add a fallback transition to
each state that catches invalid or unexpected property values by adding a
condition that evaluates to true when the pokeb:state does not match any of the
expected valid values, and route those cases to a new "error" state. Then define
the "error" state with appropriate animations or visual feedback to gracefully
handle unexpected state values instead of leaving the entity stuck.

In `@animations/cloningMachine/dna_scanner.animation.json`:
- Around line 466-1024: The animation.dna_scanner.error animation contains
excessive repetitive keyframe definitions across its bones (red2, green, red3,
red4, green1, green2, green3) with hundreds of nearly identical position toggles
between states like [0,0,0] and [0,0,-1]. Review whether the stepped blinking
effect requires all these individual keyframes or if the animation can achieve
the same visual result with fewer, consolidated keyframes and smoother
interpolation. Reduce the keyframe count for each bone by grouping similar
transitions and removing redundant entries while preserving the intended
animation behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e8b5814e-0e9b-465a-837e-03b207100335

📥 Commits

Reviewing files that changed from the base of the PR and between 64e1f50 and fa6d0b7.

📒 Files selected for processing (34)
  • animation_controllers/cloningMachine/battery_holder.json
  • animation_controllers/cloningMachine/battery_holder_pipe.json
  • animation_controllers/cloningMachine/containment_chamber.json
  • animation_controllers/cloningMachine/containment_chamber_liquid.json
  • animation_controllers/cloningMachine/dna_scanner.json
  • animations/cloningMachine/battery_holder.animation.json
  • animations/cloningMachine/battery_holder_pipe.animation.json
  • animations/cloningMachine/containment_chamber.animation.json
  • animations/cloningMachine/containment_chamber_liquid.animation.json
  • animations/cloningMachine/cooling_station.animation.json
  • animations/cloningMachine/dna_scanner.animation.json
  • animations/item_holder.animation.json
  • animations/pokemon/mewtwo.animation.json
  • entity/cloningMachine/battery_holder.json
  • entity/cloningMachine/contained_mewtwo.json
  • entity/cloningMachine/containment_chamber.json
  • entity/cloningMachine/containment_chamber_liquid.json
  • entity/cloningMachine/cooling_station.json
  • entity/cloningMachine/dna_scanner.json
  • entity/cloningMachine/pipes/battery_holder_pipe.json
  • entity/cloningMachine/pipes/cooling_station_pipe.json
  • entity/cloningMachine/pipes/dna_scanner_pipe.json
  • entity/contained_mewtwo.json
  • entity/item_holder.json
  • entity/trainer.json
  • models/entity/cloningMachine/battery_holder.geo.json
  • models/entity/cloningMachine/battery_holder_pipe.geo.json
  • models/entity/cloningMachine/containment_chamber.geo.json
  • models/entity/cloningMachine/containment_chamber_liquid.geo.json
  • models/entity/cloningMachine/cooling_station.geo.json
  • models/entity/cloningMachine/cooling_station_pipe.geo.json
  • models/entity/cloningMachine/dna_scanner.geo.json
  • models/entity/cloningMachine/dna_scanner_pipe.geo.json
  • models/entity/item_holder.geo.json
💤 Files with no reviewable changes (19)
  • entity/cloningMachine/battery_holder.json
  • entity/cloningMachine/cooling_station.json
  • entity/cloningMachine/pipes/cooling_station_pipe.json
  • entity/cloningMachine/contained_mewtwo.json
  • entity/cloningMachine/containment_chamber_liquid.json
  • entity/cloningMachine/pipes/battery_holder_pipe.json
  • entity/contained_mewtwo.json
  • entity/cloningMachine/pipes/dna_scanner_pipe.json
  • entity/cloningMachine/containment_chamber.json
  • models/entity/cloningMachine/dna_scanner_pipe.geo.json
  • entity/trainer.json
  • models/entity/cloningMachine/battery_holder_pipe.geo.json
  • entity/cloningMachine/dna_scanner.json
  • models/entity/cloningMachine/containment_chamber_liquid.geo.json
  • models/entity/item_holder.geo.json
  • models/entity/cloningMachine/cooling_station.geo.json
  • models/entity/cloningMachine/cooling_station_pipe.geo.json
  • models/entity/cloningMachine/battery_holder.geo.json
  • entity/item_holder.json
🚧 Files skipped from review as they are similar to previous changes (10)
  • animation_controllers/cloningMachine/battery_holder_pipe.json
  • animation_controllers/cloningMachine/dna_scanner.json
  • animation_controllers/cloningMachine/containment_chamber_liquid.json
  • animations/cloningMachine/battery_holder_pipe.animation.json
  • animations/cloningMachine/battery_holder.animation.json
  • animations/item_holder.animation.json
  • animations/cloningMachine/containment_chamber.animation.json
  • animation_controllers/cloningMachine/battery_holder.json
  • animations/cloningMachine/containment_chamber_liquid.animation.json
  • animations/cloningMachine/cooling_station.animation.json

Comment on lines +7 to +28
"empty": {
"animations": [
"empty"
],
"transitions": [
{
"filling": "q.property('pokeb:state') == 'filling'"
},
{
"breaking": "q.property('pokeb:state') == 'breaking'"
},
{
"opening": "q.property('pokeb:state') == 'opening'"
},
{
"opening_ditto": "q.property('pokeb:state') == 'opening_ditto'"
},
{
"closing": "q.property('pokeb:state') == 'closing'"
}
]
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Critical: Animation "empty" referenced but not mapped in entity file.

The "empty" state references an animation named "empty" (line 9), but the entity file (entity/cloningMachine/containment_chamber.json) does not define this animation key in its animations section. The entity only maps: "closing", "opening", "idle", "breaking", and "water_fill*" animations.

The animation system will fail to resolve "empty", likely causing runtime warnings or falling back to default behavior. This same issue affects "filling" (line 31) and "opening_ditto" (line 97).

🔧 Required fix in entity file

Add missing animation mappings to entity/cloningMachine/containment_chamber.json:

"animations": {
  "controller": "controller.animation.containment_chamber",
  "empty": "animation.containment_chamber.empty",
  "filling": "animation.containment_chamber.filling",
  "opening_ditto": "animation.containment_chamber.opening_ditto",
  "closing": "animation.containment_chamber.closing",
  "opening": "animation.containment_chamber.opening",
  "breaking": "animation.containment_chamber.breaking"
}

Ensure the corresponding animation definitions exist in animations/cloningMachine/containment_chamber.animation.json.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@animation_controllers/cloningMachine/containment_chamber.json` around lines 7
- 28, The containment_chamber animation controller file references animations
named "empty", "filling", and "opening_ditto" in state transitions, but these
animation keys are not defined in the animations section of the
entity/cloningMachine/containment_chamber.json file. To fix this, add the
missing animation mappings to the animations object in the entity file by
including entries for "empty", "filling", and "opening_ditto", each pointing to
their corresponding animation definitions (following the pattern of existing
animation mappings like "animation.containment_chamber.closing"). Verify that
the referenced animation definitions exist in the
animations/cloningMachine/containment_chamber.animation.json file.

Comment on lines +235 to +465
"animation.dna_scanner.idle_closed": {
"loop": true,
"animation_length": 4,
"bones": {
"green": {
"position": {
"0.0": [0, 0, 0],
"0.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"1.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
},
"1.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"2.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
},
"2.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"3.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
},
"3.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"4.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
}
}
},
"green3": {
"position": {
"0.0": [0, 0, 0],
"0.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"1.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
},
"1.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"2.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
},
"2.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"3.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
},
"3.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"4.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
}
}
},
"green1": {
"position": {
"0.0": [0, 0, 0],
"0.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"1.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
},
"1.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"2.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
},
"2.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"3.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
},
"3.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"4.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
}
}
},
"green2": {
"position": {
"0.0": [0, 0, 0],
"0.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"1.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
},
"1.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"2.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
},
"2.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"3.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
},
"3.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"4.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
}
}
},
"green4": {
"position": {
"0.0": [0, 0, 0],
"0.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"1.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
},
"1.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"2.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
},
"2.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"3.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
},
"3.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"4.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
}
}
},
"green5": {
"position": {
"0.0": [0, 0, 0],
"0.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"1.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
},
"1.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"2.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
},
"2.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"3.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
},
"3.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"4.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
}
}
},
"bone39": {
"rotation": [0, 0, 0]
}
}
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major | 🏗️ Heavy lift

Consider extracting the shared position keyframes to reduce duplication.

The idle_closed animation duplicates all position keyframes from idle_open (lines 4-234), differing only in bone39 rotation. This ~230-line duplication creates a maintainability burden—any change to the blinking pattern must be synchronized across both animations.

While Bedrock's animation format doesn't directly support inheritance, consider whether the two states could share a base animation or whether animation blending could separate the positional blinking from the rotation state.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@animations/cloningMachine/dna_scanner.animation.json` around lines 235 - 465,
The animation.dna_scanner.idle_closed animation contains duplicated position
keyframes for all green bones (green, green1, green2, green3, green4, green5)
that are identical to those in the idle_open animation, with the only difference
being the bone39 rotation value. To reduce this ~230-line duplication, explore
extracting the shared position keyframes into a separate base animation or use
animation blending to separate the positional blinking pattern from the rotation
state, allowing both idle_open and idle_closed to reference the same blinking
animation while only differing in their bone39 rotation configuration.

Comment on lines +1038 to +1505
"animation.dna_scanner.opening": {
"loop": "hold_on_last_frame",
"animation_length": 4,
"bones": {
"green": {
"position": {
"0.0": [0, 0, 0],
"0.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"1.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
},
"1.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"2.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
},
"2.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"3.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
},
"3.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"4.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
}
}
},
"green3": {
"position": {
"0.0": [0, 0, 0],
"0.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"1.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
},
"1.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"2.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
},
"2.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"3.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
},
"3.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"4.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
}
}
},
"green1": {
"position": {
"0.0": [0, 0, 0],
"0.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"1.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
},
"1.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"2.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
},
"2.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"3.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
},
"3.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"4.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
}
}
},
"green2": {
"position": {
"0.0": [0, 0, 0],
"0.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"1.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
},
"1.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"2.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
},
"2.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"3.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
},
"3.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"4.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
}
}
},
"green4": {
"position": {
"0.0": [0, 0, 0],
"0.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"1.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
},
"1.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"2.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
},
"2.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"3.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
},
"3.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"4.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
}
}
},
"green5": {
"position": {
"0.0": [0, 0, 0],
"0.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"1.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
},
"1.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"2.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
},
"2.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"3.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
},
"3.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"4.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
}
}
},
"bone39": {
"rotation": {
"0.0": [0, 0, 0],
"0.5": [0, -90, 0]
}
}
}
},
"animation.dna_scanner.closing": {
"loop": "hold_on_last_frame",
"animation_length": 4,
"bones": {
"green": {
"position": {
"0.0": [0, 0, 0],
"0.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"1.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
},
"1.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"2.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
},
"2.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"3.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
},
"3.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"4.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
}
}
},
"green3": {
"position": {
"0.0": [0, 0, 0],
"0.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"1.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
},
"1.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"2.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
},
"2.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"3.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
},
"3.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"4.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
}
}
},
"green1": {
"position": {
"0.0": [0, 0, 0],
"0.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"1.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
},
"1.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"2.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
},
"2.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"3.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
},
"3.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"4.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
}
}
},
"green2": {
"position": {
"0.0": [0, 0, 0],
"0.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"1.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
},
"1.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"2.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
},
"2.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"3.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
},
"3.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"4.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
}
}
},
"green4": {
"position": {
"0.0": [0, 0, 0],
"0.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"1.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
},
"1.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"2.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
},
"2.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"3.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
},
"3.5": {
"pre": [0, 0, 0],
"post": [0, 0, 1]
},
"4.0": {
"pre": [0, 0, 1],
"post": [0, 0, 0]
}
}
},
"green5": {
"position": {
"0.0": [0, 0, 0],
"0.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"1.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
},
"1.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"2.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
},
"2.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"3.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
},
"3.5": {
"pre": [0, 0, 0],
"post": [0, 0, -1]
},
"4.0": {
"pre": [0, 0, -1],
"post": [0, 0, 0]
}
}
},
"bone39": {
"rotation": {
"0.0": [0, -90, 0],
"0.5": [0, 0, 0]
}
}
}
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major | 🏗️ Heavy lift

Significant duplication: opening and closing animations repeat shared keyframes.

The opening (lines 1038-1271) and closing (lines 1272-1505) animations duplicate the same ~230 lines of position keyframes already present in idle_open and idle_closed. Across all four animations, these identical position timelines are repeated, totaling ~690 lines of duplication. Only the bone39 rotation keyframes differ between states.

This duplication severely impacts maintainability—updating the LED blinking pattern would require changes in four locations. Consider refactoring to share the position timelines or document why the duplication is necessary given Bedrock's animation system constraints.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@animations/cloningMachine/dna_scanner.animation.json` around lines 1038 -
1505, The position keyframes for bones green, green1, green2, green3, green4,
and green5 are identical between animation.dna_scanner.opening and
animation.dna_scanner.closing, and this same pattern is repeated across
idle_open and idle_closed animations, resulting in approximately 690 lines of
duplication. Only the bone39 rotation keyframes differ between the opening and
closing states. Refactor the animation structure to consolidate these shared
position timelines into a reusable pattern or extract them into a separate
shared animation reference if the Bedrock animation system supports it, while
keeping only the unique bone39 rotation keyframes separate for each state. If
duplication is unavoidable due to Bedrock constraints, document the reason
clearly in comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants