Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update conventions #4127

Open
wants to merge 2 commits into
base: 25w07a
Choose a base branch
from
Open

Conversation

apple502j
Copy link
Contributor

Updates the convention document to codify unwritten rules and traditions and clarify some rules.

@apple502j apple502j requested a review from a team as a code owner February 18, 2025 15:06
@@ -64,6 +82,7 @@ name patterns you should use.
### Ticks and updates

Use "tick" for updates done once per tick. Use "update" for other kind of updates.
Note that "tick" is used in block-related code for things that are not performed once per tick for historical reasons. For example, neither `randomTick` nor `scheduledTick` gets called once per tick.
Copy link
Member

Choose a reason for hiding this comment

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

Nit: not solely historical reasons but also game strings (randomTickSpeed etc)

CONVENTIONS.md Outdated Show resolved Hide resolved

### Other conventions
- Methods that register the values and return the default value (i.e. `Registries.Initializer`) should be named `registerAndGetDefault` for static registries, and `bootstrap` for dynamic registries.
- Use "draw" for drawing a simple shape, such as rectangles, cubes, texts, and a texture. Use "render" for drawing something more concrete, such as the sky, blocks, entities, particles, user interfaces, and buttons. A "render" method typically includes multiple "draw" calls.
Copy link
Member

Choose a reason for hiding this comment

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

Resolves #984, I think

Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>
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