-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
Remove separate eye height field from EntityEvent.Size #1171
Remove separate eye height field from EntityEvent.Size #1171
Conversation
The EntityDimensions object in the event now contains the eye height (where previously it was stored separately in the entity). Resolves neoforged#1170
The accessor is no longer used, as the eye height of the entity is stored with the EntityDimensions.
Last commit published: dc039d19d03c3d4a4e39c33b722db2d665ec8671. PR PublishingThe artifacts published by this PR:
Repository DeclarationIn order to use the artifacts published by the PR, add the following repository to your buildscript: repositories {
maven {
name 'Maven for PR #1171' // https://github.com/neoforged/NeoForge/pull/1171
url 'https://prmaven.neoforged.net/NeoForge/pr1171'
content {
includeModule('net.neoforged', 'neoforge')
includeModule('net.neoforged', 'testframework')
}
}
} MDK installationIn order to setup a MDK using the latest PR version, run the following commands in a terminal. mkdir NeoForge-pr1171
cd NeoForge-pr1171
curl -L https://prmaven.neoforged.net/NeoForge/pr1171/net/neoforged/neoforge/21.0.39-beta-pr-1171-1.21-GH-1170-entityevent-size-eye-height/mdk-pr1171.zip -o mdk.zip
jar xf mdk.zip
rm mdk.zip || del mdk.zip To test a production environment, you can download the installer from here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change itself appears fine. Curious about the relationship between the new size attributes, whether the Entit0Eventy.Size
event is still useful or fired when that attribute changes?
When the entity scale attribute changes (in a living entity), the living entity tick will notice the change (as it stores the previous scale value as the The value of the scale attribute is used in Therefore, the event is still useful to control the final dimensions of the entity, but I believe developers will need to apply the scale value manually (from |
@sciwhiz12, this PR introduces breaking changes. Compatibility checks
|
This PR resolves #1170 by removing the separate eye height field (and getter/setter) from
EntityEvent.Size
, and using the eye height stored in theEntityDimensions
object instead.Previously, the eye height was stored separately from the
EntityDimensions
, which explains why the event treated it separately. But in one of the 1.20 releases (I believe 1.20.5), the eye height is now part of theEntityDimensions
object.This PR also removes the now-unused
Entity#getEyeHeightAccess
accessor, since the eye height is now longer calculated by thegetEyeHeight
method it was accessing, and cleans up the javadoc forEntityEvent.Size
.FYI, @robotgryphon, one of us will have to update the javadoc for the event to use
isAddedToLevel()
per your PR #1166, depending on which one of us gets merged first.