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

Entity docs #171

Open
wants to merge 84 commits into
base: main
Choose a base branch
from

Conversation

IchHabeHunger54
Copy link
Member

@IchHabeHunger54 IchHabeHunger54 commented Oct 3, 2024

Adds some long-needed entity documentation. Supersedes #15 and #95 . Closes #82 . Closes #90 . This PR:

  • Adds articles about the following:
    • Entities in general
    • Data and networking in the context of entities
    • The LivingEntity, Mob and Player classes, along with their subclasses
    • Attributes and AttributeModifiers
    • Entity renderers and entity models
  • Removes the Entities article in the Networking section, in favor of the new Data and Networking article
  • Updates the Interaction Pipeline article with left-click and middle-click behavior, and also renames it to just Interactions
  • Adds an explanation for how block breaking speed is calculated, including how the various attributes affect this
    • Also does some reformatting in the blocks article, while we're at it
  • Adds and adjusts links to the new Entities section as necessary
  • Adds a styleguide for Mermaid class diagrams to the Contributing doc
  • Explicitly leaves WIP markers for pathfinding, goals and brains, as well as animations, as these deserve their own PR(s)

Preview URL: https://pr-171.neoforged-docs-previews.pages.dev

IchHabeHunger54 and others added 30 commits January 29, 2024 18:04
Co-authored-by: ChampionAsh5357 <[email protected]>
@neoforged-automation neoforged-automation bot added the needs rebase This Pull Request needs to be rebased before being merged label Jan 10, 2025
@neoforged-automation
Copy link

@IchHabeHunger54, this pull request has conflicts, please resolve them for this PR to move forward.

# Conflicts:
#	docs/resources/client/models/bakedmodel.md
#	docs/resources/server/conditions.md
@neoforged-automation neoforged-automation bot removed the needs rebase This Pull Request needs to be rebased before being merged label Jan 10, 2025
@neoforged-pages-deployments neoforged-pages-deployments bot deployed to neoforged-docs-previews (Preview) January 10, 2025 23:31 Active
@neoforged-pages-deployments neoforged-pages-deployments bot deployed to neoforged-docs-previews (Preview) February 4, 2025 12:52 Active
@neoforged-pages-deployments neoforged-pages-deployments bot deployed to neoforged-docs-previews (Preview) February 6, 2025 13:49 Active
@neoforged-pages-deployments neoforged-pages-deployments bot deployed to neoforged-docs-previews (Preview) February 6, 2025 15:27 Active
@neoforged-pages-deployments neoforged-pages-deployments bot deployed to neoforged-docs-previews (Preview) February 6, 2025 16:22 Active
@neoforged-pages-deployments neoforged-pages-deployments bot deployed to neoforged-docs-previews (Preview) February 6, 2025 16:44 Active
Copy link
Contributor

@ChampionAsh5357 ChampionAsh5357 left a comment

Choose a reason for hiding this comment

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

I give you...more comments!


As such, vanilla introduces a few systems to help with that. These systems generally exist in parallel and can be replaced with one another, this is due to legacy reasons.

## `SynchedEntityData`
Copy link
Contributor

Choose a reason for hiding this comment

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

Going to unresolve and more specifically say that if you need to sync additional data from the entity, such as for data attachments, then you should create your own network packet to sync manually as required.

You can link to your data attachments section below.

if (renderer != null) {
// Add the layer to the renderer. Like above, construct a new MyRenderLayer.
// The EntityModelSet can be retrieved from the event through #getEntityModels.
renderer.addLayer(new MyRenderLayer(renderer, event.getEntityModels()));
Copy link
Contributor

Choose a reason for hiding this comment

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

This would not compile due to the generics.

// Get the associated PlayerRenderer.
if (event.getSkin(skin) instanceof PlayerRenderer playerRenderer) {
// Add the layer to the renderer.
playerRenderer.addLayer(new MyRenderLayer(playerRenderer, event.getEntityModels()));
Copy link
Contributor

Choose a reason for hiding this comment

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

This would not compile due to the generics differing between the layer and the renderer.

@neoforged-automation neoforged-automation bot added the needs rebase This Pull Request needs to be rebased before being merged label Feb 15, 2025
@neoforged-automation
Copy link

@IchHabeHunger54, this pull request has conflicts, please resolve them for this PR to move forward.

@neoforged-automation neoforged-automation bot removed the needs rebase This Pull Request needs to be rebased before being merged label Feb 25, 2025
@neoforged-pages-deployments neoforged-pages-deployments bot deployed to neoforged-docs-previews (Preview) February 25, 2025 11:44 Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition Adding or rewriting information. large Major additions or changes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Entities - Simply Complicated Creative flight attribute and other attributes need documentation
6 participants