#(Resolved) Animation Controller - /loot works in game but not in my file?

1 messages ยท Page 1 of 1 (latest)

light trench
#

So I am making a non experimental item generator. I can summon an entity and kill command it for loot just fine, setblock a block and destroy it as well, but I am wanting to simplify it with the loot command. In game this command works and summons my loot table but for some reason it is not being called from my generator. Any ideas as to why?

    "format_version": "1.10.0",
    "animation_controllers": {
        "controller.animation.oak_tree_commands": {
            "states": {
                "default": {
                    "transitions": [
                        {
                            "check_for_growth": "query.skin_id == 1"
                        },
                        {
                            "execute_no_commands": "query.skin_id == 0"
                        }
                    ]
                },
                "check_for_growth": {
                    "transitions": [
                        {
                            "default": "query.skin_id != 1"
                        }
                    ],
                    "on_entry": ["/loot spawn ~ ~1 ~ loot 'entities/oak_log'",
                        "@s execute_no_commands"]
                },
                "execute_no_commands": {
                    "transitions": [
                        {
                            "default": "query.skin_id != 0"
                        }
                    ],
                            "on_entry": ["/say it is done",
                        "@s check_for_growth"]
                }
            }
        }
    }
}```
#

The second it is done transition works fine too. I got it looping every 20 seconds to be sure

#
    "format_version": "1.16.100",
    "minecraft:entity": {
        "description": {
            "identifier": "luna:oak_tree_sapper",
            "is_spawnable": true,
            "is_summonable": true,
            "is_experimental": false,
            "scripts": {
                "animate": [
                "luna:oak_tree_commands"
                ]
            },
            "animations": {
                "luna:oak_tree_commands": "controller.animation.oak_tree_commands"
            }
        },
        "component_groups": {
            "execute_no_commands": {
                "minecraft:skin_id": {
                    "value": 0
                },
                "minecraft:timer": {
                "looping": false,
                "time": 10,
                "time_down_event": {
                    "event": "luna:check_for_growth"
                    }
                }
            },
            "check_for_growth": {
                "minecraft:skin_id": {
                    "value": 1
                },
                "minecraft:timer": {
                "looping": false,
                "time": 10,
                "time_down_event": {
                    "event": "luna:execute_no_commands"
                    }
                }
            }
        },
        "components": {
            "minecraft:type_family": {
                "family": [ "inanimate" ]
            },
            "minecraft:item_hopper": {},
            "minecraft:timer": {
                "looping": false,
                "time": 10,
                "time_down_event": {
                    "event": "luna:check_for_growth"
                }
            },
            "minecraft:inventory": {
                "inventory_size": 27,
                "container_type": "container"
            },```
#
            "minecraft:physics": {
                "has_gravity": true,
                "has_collision": true
            },
            "minecraft:collision_box": {
                "width": 1.0,
                "height": 1.0
            },
            "minecraft:pushable": {
                "is_pushable": false
            },
            "minecraft:conditional_bandwidth_optimization": {
            }
        },
        "events": {
            "minecraft:entity_spawned": {
                "add": {
                    "component_groups": [
                "check_for_growth"
                    ]
                }
            },
            "execute_no_commands": {
                "remove": {
                    "component_groups": [
                "check_for_growth"
                    ]
                },
                "add": {
                    "component_groups": [
                "execute_no_commands"
                    ]
                }
            },
            "luna:check_for_growth": {
                "remove": {
                    "component_groups": [
                "execute_no_commands"
                    ]
                },
                "add": {
                    "component_groups": [
                "check_for_growth"
                    ]
                }
            }
        }
    }
}```
stable cipher
light trench
#

Thanks ๐Ÿ˜Š๐Ÿ‘ I will try it now

light trench
stable cipher
light trench
#

Oh that makes sense and is really good to know now.