terrarium-earth / Heracles

A tree style questing mod allowing creators to set completable quests for their users
MIT License
35 stars 19 forks source link

[Bug]: Structures are discovered too early #208

Open sisby-folk opened 8 months ago

sisby-folk commented 8 months ago

Bug Description

Structure exploration tasks are triggered whenever you're in a referenced chunk, which means you'll explore mineshafts and ocean monuments without even looking (or digging)

How to Reproduce?

Create a structure task for a mineshaft

walk around on the surface (or, above a mineshaft, specifically)

toast!

Expected Behavior

This always bothered us in FTB quests, and it can be fixed here.

Checking the structure bounding box isn't good enough, but checking the piece bounding boxes is.

Here's a snippet from our current project that does exactly this while dodging the 50 footguns of this part of vanilla code. We also use a block raycast to check where the player is looking, but that's not relevant for heracles.

There's a small segment in it that refers to whether a player has explored a structure or not - that would instead be if the player has an unlocked structure task for that structure.

You have written permission to adapt it with co-authorship & a javadoc comment

Version

1.1.11

Mod Loader Version

-

Mod Loader

No response

Logs or additional context

No response

Code of Conduct