davqvist / CustomAchievements

GNU General Public License v3.0
2 stars 1 forks source link

Request: Give reward when getting achievement #9

Open Terpo opened 6 years ago

Terpo commented 6 years ago

Instead of a trophy, give the player a (by modpack author) defined reward.

Simple example: There is an achievement to kill a ghast. After the ghast is killed you get your special trophy and a new bow:

    {
      "uid": "killGhast",
      "name": "Ghast killed",
      "desc": "Kill a ghast",
      "type": "KILL",
      "item": "minecraft:ghast_tear",
      "mob": "Ghast",
      "statValue": 0,
      "ignoreMeta": false,
      "parent": "",
      "trophy": true,
      "reward": "minecraft:bow",    | can be "" for no reward
      "xpos": 2,
      "ypos": 0
    },

This will give a fancy trophy with a ghast tear but also puts a new bow in the players inventory. So this mod can also act as some kind of progression system. For example giving the player heart canisters to increase their amount of hearts.

I am still on 1.11.2 and would really appreciate such a feature.


edit: For modpack authors that look for workaround: It is possible to use CraftTweaker and define a recipe that uses the trophy and crafts something from it: _recipes.addShapeless(, [.onlyWithTag({item: {id: "minecraft:ghasttear", Count: 1 as byte, Damage: 0 as short}})]);

davqvist commented 6 years ago

Good idea, I will consider it, won't promise anything though.