feat(spark_pet): major overhaul — traits, animations, riding, fire, coloured hatching
All checks were successful
Deploy Addons / deploy (push) Successful in 24s

- Movement: slower follow (speed 0.3, stop_dist 5), near-zero teleport chance
- Scales: baby 0.65, juvenile 0.9, adult 1.3 (up from 0.4/0.7/1.0)
- Personality traits (0–4): set by feeding specific foods while sneaking;
  affects stroll range, follow distance, look-at-player frequency
- Passtime animations driven by pure Molang lifecycle math (no timer components):
  groom, sniff, stretch, happy_bounce cycling ~every 3 min per dragon
- Rideable adults: minecraft:rideable + input_ground_controlled, seat at [0,0.9,-0.3]
- Fire breathing: autonomous vs monsters (radius 16) + player-triggered (sneak + fire_charge)
- New hatching system: 6 nest block variants (oak/spruce/jungle/crimson/warped/obsidian),
  craft nest + dragon_egg → coloured egg item; place egg, bonemeal + blaze powder → hatch;
  dragon colour matches nest type via 6 separate egg entity types + born_color events
- 18 new PNG textures: 6 dragon colours, 6 nest blocks, 6 egg items (HSV hue rotation)
- Render controller updated to use texture array indexed by silverlabs:dragon_color property

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-25 02:12:44 +00:00
parent c32dbf42c4
commit 4bd9efc081
57 changed files with 2162 additions and 320 deletions

View File

@@ -1,6 +1,7 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.spark_dragon.beacon": {
"initial_state": "inactive",
"states": {
@@ -19,22 +20,30 @@
}
}
},
"controller.animation.spark_dragon": {
"initial_state": "idle",
"states": {
"idle": {
"animations": ["idle"],
"transitions": [
{ "fire_breathing": "query.property('silverlabs:firing')" },
{ "flying": "!query.is_on_ground && query.property('silverlabs:growth_stage') == 2" },
{ "walking": "query.modified_move_speed > 0.1" },
{ "sleeping": "query.is_sitting && (query.day_light_level < 4)" },
{ "sitting": "query.is_sitting" }
{ "sitting": "query.is_sitting" },
{ "grooming": "query.is_on_ground && query.modified_move_speed <= 0.05 && math.mod(math.floor((query.life_time + math.mod(math.abs(math.floor(query.position(0) + query.position(2))), 5) * 36.0) / 36.0), 5) == 1" },
{ "sniffing": "query.is_on_ground && query.modified_move_speed <= 0.15 && math.mod(math.floor((query.life_time + math.mod(math.abs(math.floor(query.position(0) + query.position(2))), 5) * 36.0) / 36.0), 5) == 2" },
{ "happy_bounce": "query.is_on_ground && query.modified_move_speed <= 0.05 && query.property('silverlabs:mood') == 2 && math.mod(math.floor((query.life_time + math.mod(math.abs(math.floor(query.position(0) + query.position(2))), 5) * 36.0) / 36.0), 5) == 3" },
{ "stretching": "query.is_on_ground && query.modified_move_speed <= 0.05 && math.mod(math.floor((query.life_time + math.mod(math.abs(math.floor(query.position(0) + query.position(2))), 5) * 36.0) / 36.0), 5) == 4" }
]
},
"walking": {
"animations": ["walk"],
"transitions": [
{ "fire_breathing": "query.property('silverlabs:firing')" },
{ "flying": "!query.is_on_ground && query.property('silverlabs:growth_stage') == 2" },
{ "sniffing": "query.is_on_ground && query.modified_move_speed <= 0.15 && math.mod(math.floor((query.life_time + math.mod(math.abs(math.floor(query.position(0) + query.position(2))), 5) * 36.0) / 36.0), 5) == 2" },
{ "idle": "query.modified_move_speed <= 0.1" },
{ "sitting": "query.is_sitting" }
]
@@ -56,12 +65,51 @@
"flying": {
"animations": ["fly"],
"transitions": [
{ "fire_breathing": "query.property('silverlabs:firing')" },
{ "idle": "query.is_on_ground && query.modified_move_speed <= 0.1" },
{ "walking": "query.is_on_ground && query.modified_move_speed > 0.1" }
]
},
"grooming": {
"animations": ["groom"],
"transitions": [
{ "fire_breathing": "query.property('silverlabs:firing')" },
{ "idle": "query.modified_move_speed > 0.05 || query.is_sitting || math.mod(math.floor((query.life_time + math.mod(math.abs(math.floor(query.position(0) + query.position(2))), 5) * 36.0) / 36.0), 5) != 1" }
]
},
"sniffing": {
"animations": ["sniff"],
"transitions": [
{ "fire_breathing": "query.property('silverlabs:firing')" },
{ "idle": "query.modified_move_speed > 0.15 || query.is_sitting || math.mod(math.floor((query.life_time + math.mod(math.abs(math.floor(query.position(0) + query.position(2))), 5) * 36.0) / 36.0), 5) != 2" },
{ "walking": "query.modified_move_speed > 0.1 && math.mod(math.floor((query.life_time + math.mod(math.abs(math.floor(query.position(0) + query.position(2))), 5) * 36.0) / 36.0), 5) == 2" }
]
},
"happy_bounce": {
"animations": ["happy_bounce"],
"transitions": [
{ "fire_breathing": "query.property('silverlabs:firing')" },
{ "idle": "query.modified_move_speed > 0.05 || query.is_sitting || query.property('silverlabs:mood') != 2 || math.mod(math.floor((query.life_time + math.mod(math.abs(math.floor(query.position(0) + query.position(2))), 5) * 36.0) / 36.0), 5) != 3" }
]
},
"stretching": {
"animations": ["stretch"],
"transitions": [
{ "fire_breathing": "query.property('silverlabs:firing')" },
{ "idle": "query.modified_move_speed > 0.05 || query.is_sitting || math.mod(math.floor((query.life_time + math.mod(math.abs(math.floor(query.position(0) + query.position(2))), 5) * 36.0) / 36.0), 5) != 4" }
]
},
"fire_breathing": {
"animations": ["fire_breath"],
"transitions": [
{ "flying": "!query.property('silverlabs:firing') && !query.is_on_ground && query.property('silverlabs:growth_stage') == 2" },
{ "idle": "!query.property('silverlabs:firing') && query.is_on_ground" },
{ "walking": "!query.property('silverlabs:firing') && query.modified_move_speed > 0.1" }
]
}
}
},
"controller.animation.spark_dragon.mood": {
"initial_state": "content",
"states": {
@@ -91,5 +139,6 @@
}
}
}
}
}