#Resize attachable when on hand

1 messages · Page 1 of 1 (latest)

swift fossil
#

Hi there, I made this attachable following some suggestions here, and with the following binding it can change the attachable behavior when it is wearing or when it is holding on hands, so it looks like item when in hands and a helmet when wearing to head: context.item_slot == 'head' ? 'head' : query.item_slot_to_bone_name(context.item_slot)
Now I wanted to resize the item when it is on hand, because I use a higher texture size and it is looking oversized on my hands, also how to change the position of the item when it is not wearing?

{
    "format_version": "1.10.0",
    "minecraft:attachable": {
        "description": {
            "identifier": "awp:dark_helmet",
            "materials": {
                "default": "entity_alphablend",
                "enchanted": "entity_alphatest_glint"
            },
            "textures": {
                "default": "textures/items/helmets/dark_helmet",
                "item": "textures/items/helmets/dark_helmet_icon",
                "enchanted": "textures/misc/enchanted_item_glint"
            },
            "geometry": {
                "default": "geometry.dark_helmet"
            },
            "animations": {
                "hold_first_person": "animation.dark_helmet.hold_first_person",
                "hold_third_person": "animation.dark_helmet.hold_third_person"
            },
            "scripts": {
                "animate": [
                    { "hold_first_person": "c.is_first_person" },
                    { "hold_third_person": "!c.is_first_person" }
                ]
            },
            "render_controllers": [ "controller.render.default" ]
        }
    }
}```
swift fossil
#

so trying different options here, now with this that would probably handle more than two animations, so I can have the attachable rendering on head and on mainhand when it is not wearing json { "format_version": "1.10.0", "minecraft:attachable": { "description": { "identifier": "awp:dark_helmet", "materials": { "default": "entity_alphablend", "enchanted": "entity_alphatest_glint" }, "textures": { "default": "textures/items/helmets/dark_helmet", "enchanted": "textures/misc/enchanted_item_glint" }, "geometry": { "default": "geometry.dark_helmet" }, "scripts": { "pre_animation": [ "v.main_hand = c.item_slot == 'main_hand';", "v.head = c.item_slot == 'head';" ], "animate": [ { "hold_first_person": "v.main_hand && c.is_first_person" }, { "hold_third_person": "v.main_hand && !c.is_first_person" }, { "wear_first_person": "v.head && c.is_first_person" }, { "wear_third_person": "v.head && !c.is_first_person" } ] }, "animations": { "hold_first_person": "animation.dark_helmet.hold_first_person", "hold_third_person": "animation.dark_helmet.hold_third_person", "wear_first_person": "animation.dark_helmet.wear_first_person", "wear_third_person": "animation.dark_helmet.wear_third_person" }, "render_controllers": ["controller.render.default"] } } }
so on the binding I have the following to the root group *** q.item_slot_to_bone_name(c.item_slot) ***, but it doesnt render the helmet. can someone help me?

tender hinge
#

Or isnt the animation here not the issue?

#

Are there any content logs?

swift fossil
# tender hinge The hold_first and hold_third animation make the scale bigger right?

no errors on content logs, the animation on hold_first and third supposed to resize the item and change it`s offset to fit the hand position, I have done it with other items, but these items are just items and not wearable.

that specific one is wearable too, so when I m wearing it it works just fine, the animation and rendering is being triggered.
but when it is on hand the texture changes to the "icon" texture that I have on my item (behavior) and I cannot use the custom on from the attachables to render it. I tried also deleting the component "icon" from the item behavior and tried to render it but it doesn't render at all, so something is missing here to render the item when it is hold on hands only. So while holding it, it is not even the 3D model, is the icon of the item only,