Skip to content

Conversation

@Norazan
Copy link
Member

@Norazan Norazan commented Feb 26, 2025

This PR completes DeeperWorld#25

  • Add depth calculation to the WorldManager API in the form of getDepthFor functions
    • I changed the algorithm a bit compared to how it was in MineInAbyss, to allow for any variation in the sections configuration. The MineInAbyss logic only worked if all sections were configured along the same horizontal axis.
  • Introduce a height property to the Section class
  • Add a "depth" command that returns the depth of a given player (or the executor, if it is a player)

I'll change MineInAbyss to use the new methods after this PR is merged.

}
}
"depth" {
val playerArg = ArgumentTypes.player()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am open to suggestions on how to more easily get a single player or the executor as a player if no player is specified. I'd like to avoid having to deal with a list of players in the executes logic, if possible.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you have to use a list even for single players in brigadier, slightly annoying but yeah

@Norazan Norazan marked this pull request as ready for review February 26, 2025 03:03
@Boy0000 Boy0000 self-requested a review March 3, 2025 11:41
@Boy0000 Boy0000 merged commit d4d0149 into MineInAbyss:master Mar 3, 2025
1 check 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.

2 participants