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

(Feature request) Other criteria for advancements #20

Open Olthoo opened 1 year ago

Olthoo commented 1 year ago

Instead of explaining with my poor english , here is the advancements's criteria that I can't trigger Those are really not an issue so you can take as much time as you want. or refuse it all together, those are niche case.

"ender_dragon": {
            "trigger": "minecraft:entity_hurt_player",
            "conditions": {
                "damage": {
                    "blocked": true,
                    "source_entity": {
                        "type": "ender_dragon"
                    }
                }
            }
##################################################
"player": [
          {
            "condition": "minecraft:entity_properties",
            "entity": "this",
            "predicate": {
              "type_specific": {
                "type": "player",
                "looking_at": {
                  "type": "minecraft:ender_dragon"
                }
              }
            }
          }
        ]
      },
      "trigger": "minecraft:using_item"
    }
  }

##########################################################

"ring_of_the_end": {
            "trigger": "minecraft:location",
            "conditions": {
                "player":  {
                    "type_specific": {
                        "type": "player",
                        "stats": [
                            {
                                "type": "minecraft:killed",
                                "stat": "minecraft:ender_dragon",
                                "value": {
                                    "min": 20
                                }
                            }
                        ]
                    }
                }
            }
        }
    }

##############################################################

"ender_dragon": {
            "trigger": "minecraft:entity_killed_player",
            "conditions": {
                "entity": {
                    "type": "ender_dragon"
                }
            }
        }

If you need more precision ask me on discord at Olthoo#0322

BONNe commented 1 year ago

I can definitely do the first and the last.

The other... is a bit trickier to do. I definitely have options to detect viewing entities and I have already counter how many dragons are killed, but parsing the advancements is not so simple, as it not only requires to know the involved entities, but also the target item/counter :(

Olthoo commented 1 year ago

I don't know if you can edit statistics of players but if you can you could add a minecraft:ender_dragon kill in the player stats when he kill a minecraft:bentobox_ender_dragon ?

Olthoo commented 1 year ago

I found this plugin that manage to edit player stats, maybe the better option would be to redirect any interaction with minecraft:bentobox_ender_dragon to minecraft:ender_dragon ?

BONNe commented 1 year ago

I don't know if you can edit statistics of players but if you can you could add a minecraft:ender_dragon kill in the player stats when he kill a minecraft:bentobox_ender_dragon ?

Don't need plugin for that. Will add it

Olthoo commented 1 year ago

Yup that was just a "proof of concept" :D if you add this "link" between stats you can probably remove the advancements part of the plugin since it will be double usage.