Home > Net >  Why doesn't my Json code for Minecraft origins load in-game? I get 0 errors and everything seem
Why doesn't my Json code for Minecraft origins load in-game? I get 0 errors and everything seem

Time:07-11

I don't have much information since I am literally just, baffled.

The code (It is just the code to make the energy bar actually fill up) is supposed to make any player with the thunderstruck origin have their charge-bar fill up when they kill something and are not wearing dragon-scale armor. If they are wearing the armor, they should lose the charge instead of gain it.

For some reason though, the game refuses to load it, giving no errors or anything to hint at the problem.

{
    "type": "origins:self_action_on_kill",
    "entity_action": {
        "type": "origins:if_else",
        "condition": {
            "type": "origins:or",
            "conditions": [
                {
                    "type": "origins:equipped_item",
                    "equipment_slot": "head",
                    "item_condition": {
                        "type": "origins:ingredient",
                        "ingredient": {
                            "item": "dragonloot:dragon_helmet"
                        }
                    }
                },
                {    
                    "type": "origins:equipped_item",
                    "equipment_slot": "chest",
                    "item_condition": {
                        "type": "origins:ingredient",
                        "ingredient": {
                            "item": "dragonloot:dragon_chestplate"
                        }
                    }
                },
                {
                    "type": "origins:equipped_item",
                    "equipment_slot": "legs",
                    "item_condition": {
                        "type": "origins:ingredient",
                        "ingredient": {
                            "item": "dragonloot:dragon_leggings"
                        }
                    }
                },
                {
                    "type": "origins:equipped_item",
                    "equipment_slot": "feet",
                    "item_condition": {
                        "type": "origins:ingredient",
                        "ingredient": {
                            "item": "dragonloot:dragon_boots"
                        }
                    }
                }
            ]
        },
        "if_action": {
            "type": "origins:change_resource",
            "resource": "thunderstruck:arrow_charge",
            "change": -10
        },
        "else_action": {
            "type": "origins:change_resource",
            "resource": "thunderstruck:arrow_charge",
            "change": 10
        }
    },
    "condition": {}
}

CodePudding user response:

We think it got confused about us defining a modded armor. Here is the working code if you are interested:

{
    "type": "origins:self_action_on_kill",
    "entity_action": {
        "type": "origins:if_else",
        "condition": {
            "type": "origins:or",
            "conditions": [
                {
                    "type": "origins:equipped_item",
                    "equipment_slot": "head",
                    "item_condition": {
                        "type": "origins:armor_value",
                        "comparison": ">=",
                        "compare_to": 7
                    }
                },
                {
                    "type": "origins:equipped_item",
                    "equipment_slot": "chest",
                    "item_condition": {
                        "type": "origins:armor_value",
                        "comparison": ">=",
                        "compare_to": 10
                    }
                },
                {
                    "type": "origins:equipped_item",
                    "equipment_slot": "legs",
                    "item_condition": {
                        "type": "origins:armor_value",
                        "comparison": ">=",
                        "compare_to": 9
                    }
                },
                {
                    "type": "origins:equipped_item",
                    "equipment_slot": "feet",
                    "item_condition": {
                        "type": "origins:armor_value",
                        "comparison": ">=",
                        "compare_to": 7
                    }
                }
            ]
        },
        "if_action": {
            "type": "origins:change_resource",
            "resource": "thunderstruck:arrow_charge",
            "change": 0
        },
        "else_action": {
            "type": "origins:change_resource",
            "resource": "thunderstruck:arrow_charge",
            "change": 20
        }
    },
    "cooldown": 1
}

CodePudding user response:

I dont know anything about minecraft. But I can tell you that there are no errors in your JSON. It's valid code.

  • Related