#Cape Item/attachable
1 messages ยท Page 1 of 1 (latest)
You could add the geometry to an attachable file for an item with the minecraft:wearable component
The animation is the issue.
Ah. What issues are you running into with it?
"format_version": "1.8.0",
"animations": {
"animation.player.cape": {
"loop": true,
"bones": {
"cape": {
"rotation": ["math.clamp(math.lerp(0, -110, query.cape_flap_amount) - (13 * query.modified_move_speed), -70, 0)", "query.modified_move_speed * math.pow(math.sin(query.body_y_rotation - query.head_y_rotation(0)), 3) * 55", 0],
"position": [0, 0, "query.get_root_locator_offset('armor_offset.default_neck', 1)"]
},
"part1": {
"rotation": ["math.clamp(query.cape_flap_amount, 0, 0.5) * (math.cos(query.modified_distance_moved * 18) * 16)", 0, "0"]
},
"part2": {
"rotation": ["math.clamp(query.cape_flap_amount, 0, 0.5) * math.cos(22 - query.modified_distance_moved * 18) * 13", 0, 0],
"scale": 1
},
"part3": {
"rotation": ["math.clamp(query.cape_flap_amount, 0, 0.5) * math.cos(50 - query.modified_distance_moved * 18) * 13", 0, 0]
},
"part4": {
"rotation": ["math.clamp(query.cape_flap_amount, 0, 0.5) * math.cos(76 - query.modified_distance_moved * 18) * 13", 0, 0]
},
"part5": {
"rotation": ["math.clamp(query.cape_flap_amount, 0, 0.5) * math.cos(100 - query.modified_distance_moved * 18) * 13", 0, 0]
},
"part6": {
"rotation": ["math.clamp(query.cape_flap_amount, 0, 0.5) * math.cos(122 - query.modified_distance_moved * 18) * 13", 0, 0]
},
"part7": {
"rotation": ["math.clamp(query.cape_flap_amount, 0, 0.5) * math.cos(142 - query.modified_distance_moved * 18) * 13", 0, 0]
},
"part8": {
"rotation": ["math.clamp(query.cape_flap_amount, 0, 0.5) * math.cos(160 - query.modified_distance_moved * 18) * 13", 0, 0]
},
"part9": {
"rotation": ["math.clamp(query.cape_flap_amount, 0, 0.5) * math.cos(176 - query.modified_distance_moved * 18) * 13", 0, 0]
},
"part10": {
"rotation": ["math.clamp(query.cape_flap_amount, 0, 0.5) * math.cos(190 - query.modified_distance_moved * 18) * 13", 0, 0]
},
"part11": {
"rotation": ["math.clamp(query.cape_flap_amount, 0, 0.5) * math.cos(202 - query.modified_distance_moved * 18) * 13", 0, 0]
},
"part12": {
"rotation": ["math.clamp(query.cape_flap_amount, 0, 0.5) * math.cos(212 - query.modified_distance_moved * 18) * 13", 0, 0]
},
"part13": {
"rotation": ["math.clamp(query.cape_flap_amount, 0, 0.5) * math.cos(220 - query.modified_distance_moved * 18) * 13", 0, 0]
},
"part14": {
"rotation": ["math.clamp(query.cape_flap_amount, 0, 0.5) * math.cos(226 - query.modified_distance_moved * 18) * 13", 0, 0]
},
"part15": {
"rotation": ["math.clamp(query.cape_flap_amount, 0, 0.5) * math.cos(230 - query.modified_distance_moved * 18) * 13", 0, 0]
},
"part16": {
"rotation": ["math.clamp(query.cape_flap_amount, 0, 0.5) * math.cos(232 - query.modified_distance_moved * 18) * 13", 0, 0]
},
"shoulders": {
"rotation": [0, "query.modified_move_speed * math.pow(math.sin(query.body_y_rotation - query.head_y_rotation(0)), 3) * 60", 0]
}
}
}
}
}```
Not sure it will like this animation format
So it's not playing the animation at all then?
No, I'm not sure if it will work because it has some controllers in it. (IE, it only plays when the player moves, and IDK if that will translate to the attachable.)
Using roamwear's backpack attachable as an example, idk if it would work.
"format_version": "1.10.0",
"minecraft:attachable": {
"description": {
"identifier": "roamwear:backpack.attachable",
"item": { "roamwear:backpack": "1.0" },
"materials": {
"default": "entity_alphatest",
"enchanted": "armor_enchanted"
},
"textures": {
"default": "textures/entity/rw_backpack",
"enchanted": "textures/misc/enchanted_item_glint"
},
"geometry": {
"default": "geometry.roamwear.backpack"
},
"scripts": {
"pre_animation": [
"variable.bounce_tcos = (math.cos(query.modified_distance_moved * 38.17 + 90) * query.modified_move_speed) * 30;",
"variable.bounce_offset = (math.cos(query.modified_distance_moved * 38.17 * 2 - 90) * query.modified_move_speed) * 30;",
"variable.bounce = (math.cos(query.modified_distance_moved * 38.17 * 2 - 135) * query.modified_move_speed) * 30;"
],
"animate": [
"movement"
]
},
"animations": {
"movement": "animation.roamwear.backpack.movement"
},
"render_controllers": [
{ "controller.render.armor": "!c.is_first_person" }
]
}
}
}```
I'm not really sure if it would work either tbh; I can't really tell from just looking at it. Have you tried testing it?
Yeah. I did