Skip to content

Grant structure advancements for villages, ocean ruins and mansions - #162

Merged
tastybento merged 2 commits into
developfrom
feature/structure-advancements
Nov 30, 2026
Merged

tastybento merged 2 commits into
developfrom
feature/structure-advancements

Conversation

@tastybento

Copy link
Copy Markdown
Member

Merge #161 first. This is built on it.

The bug

The game cannot tell that a player is in a structure that was placed piece by piece, so Boxed grants "be in this structure" advancements itself when a player steps into a placed piece. It decided which advancement by checking whether the piece's name started with the name the advancement uses.

That only works where the two happen to start the same, such as igloo/top and igloo. A village piece is called village/plains/houses/... and the advancement asks for village_plains. So these never counted:

  • every kind of village,
  • ocean ruins (underwater_ruin/... against ocean_ruin_cold and ocean_ruin_warm),
  • woodland mansions (woodland_mansion/... against mansion),
  • beached shipwrecks, and bastion advancements that ask for bastion_remnant.

Separately, 22 criteria in Boxed's own advancements have names of their own, such as plains, so they were never found whatever the piece was called.

The fix

  • StructureIds turns a piece's name into the names advancements use.
  • Boxed's own advancements are found by the structure each criterion asks for, read from the advancement itself, not by the criterion's name.
  • The check ran on every step a player took inside a structure and went through every advancement on the server each time. It is now done once for each player and structure.

Also

The reach model's monster sizes are corrected. A monster spawns more than 24 blocks from the nearest player in any direction, so a small box has them as soon as its player digs down. They were set to need a box of 16; they are now 3 or 4.

Testing

5 new unit tests, 466 in total, all pass. Not tried in game: it needs a player to walk into a placed village or ocean ruin.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HBXcjZkd22rGNW5ZyL1git

tastybento and others added 2 commits November 29, 2026 17:53
Boxed grants the advancements for being in a structure itself, because
the game does not see a structure that was placed piece by piece. It
matched the piece's name against the name the advancement uses, which
only worked where the two start the same. A village piece is called
village/plains/... and the advancement asks for village_plains, so
villages, ocean ruins, mansions and beached shipwrecks never counted.

- StructureIds turns a piece's name into the names advancements use.
- Boxed's own advancements name their criteria anything, so they are now
  found by the structure they ask for, not by the criterion's name.
- The check runs on every step a player takes inside a structure and
  went through every advancement on the server each time. It is done
  once for each player and structure now.

Also corrects the model's monster sizes: a monster spawns more than 24
blocks from the player in any direction, so a small box has them as soon
as its player digs down.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HBXcjZkd22rGNW5ZyL1git
@sonarqubecloud

Copy link
Copy Markdown

@tastybento
tastybento merged commit 709e76d into develop Nov 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant