BONNePlayground / DragonFights

An addon for BentoBox plugin which allows enabling fights with ender dragons per island.
Eclipse Public License 2.0
2 stars 0 forks source link

Advancement not granted for killing the dragon #15

Closed Olthoo closed 1 year ago

Olthoo commented 1 year ago

Description

Describe the bug

I use a datapack with a mix of custom and vanilla advancements on my server, but the dragon but dragons spawned by the addon are not recognize by said advancement, I think it's due to advancement looking for the entity minecraft:ender_dragon while the summoned is called minecraft:bentobox_ender_dragon, I tried to use that name in advancement but the advancement fail to load because this entity does exist in vanilla

Steps to reproduce the behavior

Expected behavior

Dragon killed by the player are register as enderdragon in the player's statistics

Screenshots and videos (Optional)

Environment

BentoBox Version (Mandatory)
__Serveur PURPUR 1.19.2.          
[12:14:23 INFO]: Version de BentoBox : 1.21.1                                                                                  
[12:14:23 INFO]: Base de données : JSON                                                                                        
[12:14:23 INFO]: Mondes de jeu chargés :
[12:14:23 INFO]: bskyblock_world (BSkyBlock) : Overworld, Nether, End
[12:14:23 INFO]: Addons chargés :                    
[12:14:23 INFO]: Biomes 2.0.0 (ENABLED)    
[12:14:23 INFO]: Border 4.1.0-SNAPSHOT-b149 (ENABLED)
[12:14:23 INFO]: BSkyBlock 1.16.0 (ENABLED)  
[12:14:23 INFO]: Chat 1.1.4 (ENABLED)    
[12:14:23 INFO]: DragonFights 1.4.4 (ENABLED)        
[12:14:23 INFO]: ExtraMobs 1.12 (ENABLED)        
[12:14:23 INFO]: Level 2.10.0-SNAPSHOT-b516 (ENABLED)
[12:14:23 INFO]: TwerkingForTrees 1.4.3 (ENABLED)
[12:14:23 INFO]: Warps 1.12.0 (ENABLED)_____

Plugins (Optional)

_______

Additional context (Optional)

here is an example of advancement checking for dragon


    "display": {
        "icon": {
            "item": "minecraft:dragon_head"
        },
        "title": {"translate":"Free the End"},
        "description": {"color":"#75E1FF","translate":"Good luck"},
        "announce_to_chat": "true",
        "frame": "goal"
    },
    "parent": "skyo:end/dragon_shield",
    "rewards": {
        "function": "bc_rewards:end/free_the_end"
    },  
    "criteria": {
        "kill": {
            "trigger": "minecraft:player_killed_entity",
            "conditions": {
                "entity": {
                    "type": "minecraft:ender_dragon"
                }
            }
        }
    }
}```
BONNe commented 1 year ago

So, the ender dragon implemented by BentoBox is not ender dragon :D

That is because it would make it impossible to use in non-game mode worlds.

You need to use bentobox_ender_dragon. You can check if it is available if you try to use /summon command.

Olthoo commented 1 year ago

Any idea on how I can solve this issue ? advancements doesn't support minecraft:bentobox_ender_dragon nor bentobox_ender_dragon because datapacks are loaded before Bentobox, or could you maybe add a "grand advancement" in config ?

like so :

# The advancement to grant the player. The advancement has to exist on the server.
advancement: skyo:end/kill_dragon
BONNe commented 1 year ago

Hmm, I could do that...

Olthoo commented 1 year ago

That would be cool ! In vanilla 2 advancements are related to the dragon, one for killing it (minecraft:end/kill_dragon) and one for resummoning it (minecraft:end/respawn_dragon)

So adding 2 entries in the config would be fine for 95% of users. I got ~10 customs advancements that call minecraft:ender_dragon so we're gonna try to make something on our side to "link" bentobox_ender_dragon to ender_dragon in player stats but that doesn't look easy haha Thanks again for your time and quick answers !