New Task: Block Break (specifically for ores), Block Place
SupremeMarshal opened this issue ยท 4 comments
Detect if the player has gathered the items himself. The detection task is not suited for what I want to achieve in my server. I would like to have the player gathering the ressources himself instead of another player giving the items to him.
See #151.
I'm not sure how viable this is. It would really depend on the types of items that you're talking about, and it would require a LOT of custom coding as I don't believe there's anything in Minecraft that already provides support for this.
- For ores, you would need to hook into the block break event and then determine if the player is the one who broke the block, and then determine what the drops were that the player received from the block.
- For products of mobs, you'd need to separately track each kill and then work out the drops for that kill.
And so-on for every other type of item acquisition. Dungeon chests, some type of inventory opening event -> items fished up by fishing, some type of event on successful fishing even that then tracks what was gained -> some type of harvesting event to determine whether the player harvested the goods themselves, etc.
I don't think it's necessarily impossible, I just think that it would take a lot of coding and require HQM to hook into a bunch more additional events, potentially slowing down the quest checking process.
If you're not talking about "all items in general gathered by the player" but you have some specific instances, it may be possible to design a custom trigger that does exactly that for you.
I'm currently porting the Advancement task over from my branch of HQM to fit in with the new code and that allows you to do things like, say, have the player complete the quest to kill the Wither, and then have them acquire a nether star: that way, if someone gives them one, or they randomly obtain one somehow, it still requires the advancement to be completed.
So: can you give more information about which items you wish to track?
After further consultation, SupremeMarshal is specifically interested in a block break event where the player is the one responsible for breaking the block.
This was resolved in 1406b7e but I flagged the wrong issue. Oops!