LMBishop / Quests

Questing plugin for Minecraft, enabling the addition of goals for players.
https://www.spigotmc.org/resources/23696/
GNU General Public License v3.0
170 stars 85 forks source link

Smelting task does not work #443

Open tylerking opened 2 years ago

tylerking commented 2 years ago

Description of Bug

I have quests for every single "smeltable" item listed on the wiki (https://minecraft.fandom.com/wiki/Smelting?so=search) and not a single one works. Not ore, sand, iron items, ancient debris...nothing.

Steps to Reproduce

Setup smelting quest, test

Environment

Agreements

Other

No response

LMBishop commented 2 years ago

Can you send an example task and also enable the debugger and send what it outputs>

tylerking commented 2 years ago

Sure. The example task is below and the debugger said this when I smelted a Golden Boots:

[doitliketyler - smelting1goldenboots/task - type 'smelting'] Player smelted item [doitliketyler - smelting1goldenboots/task - type 'smelting'] Item does not match required item, continuing...

tasks:
  smelt:
    amount: 1
    item: "GOLDEN_BOOTS"
    type: "smelting"
display:
  type: "GOLDEN_BOOTS"
  name: "Smelt Golden Boots"
  lore-normal:
    - "Task"
    - "Smelt 1 Golden Boots"
    - ""
    - "Progress"
    - "{smelt:progress}/1 Golden Boots"
placeholders:
  progress: "{smelt:progress}/1 Golden Boots"
  task: "Smelt 1 Golden Boots"
rewards:
  - "money give {player} 50"
options:
  category: "smelting"
  sort-order: 4
Krakenied commented 2 years ago

There is no way to check the input item. You can only check the output. In this case, the output will be a gold nugget.

tylerking commented 2 years ago

That is not true. Even just using Denizen you could write a script that flags when a player puts an item into a furnace, what the item is and what the location is. Then by watching the smelting event you can get the source item, resulting item and furnace location and then cross-reference the previous flags.

Krakenied commented 2 years ago

Yes, definitely there is a way to fix it, but it won't remember the source item after server restarts. Also, It'll break when using with automatic (for example output only) hopper systems. It won't work with hopper.disable-move-event: true too. And even if we fixed it (tbh broke, not fixed), it would have major performance impact (and high memory usage as well). Additionally, that would be a veeery breaking change for servers already using this tasktype.