2019-06-28 17:55:20 -04:00
|
|
|
CLASS net/minecraft/class_922 net/minecraft/client/render/entity/LivingEntityRenderer
|
2022-01-19 12:26:32 -05:00
|
|
|
FIELD field_21011 LOGGER Lorg/slf4j/Logger;
|
2019-06-28 17:55:20 -04:00
|
|
|
FIELD field_4737 model Lnet/minecraft/class_583;
|
|
|
|
FIELD field_4738 features Ljava/util/List;
|
2020-11-04 15:44:22 -05:00
|
|
|
METHOD <init> (Lnet/minecraft/class_5617$class_5618;Lnet/minecraft/class_583;F)V
|
2020-11-12 03:57:40 -05:00
|
|
|
ARG 1 ctx
|
2020-02-02 12:23:04 -05:00
|
|
|
ARG 2 model
|
Renderer mappings (#988)
* part.render(matrix, vertices, light, overlay, red, green, blue, alpha)
* Fixed bad names
* Determined by the call to part.render(matrix, vertices, light, overlay)
which delegates to part.render(matrix, vertices, light, overlay, 1, 1, 1, 1)
* Now we extrapolate to everything that calls part.render(matrix, vertices, light, overlay)
Meanhile VertexConsumerProvider is
* Now we extrapolate to everything that cals pars.render(matrix, vertices, light, overlay, red, green, blue, alpha)
* This is not a render method! It sets the yaw and pitch on the skull
* Now we extrapolate to things that call mode.render(matrix, vertices, light, overlay, red, green, blue, alpha)
Not much to change there though
* These are known from EntityRenderDispatcher
* render calls renderLabelIfPresent
* Now we're looking at things which call EntityRenderDispatcher.render(entity, x, y, z, yaw, matrix, provider, light)
* In ClientPlayNetworkHandler.onItemPickupAnimation the second entity is gotten from packet.getCollectorEntityId and defaulted to the player if null. The first entity is an item entity or an experience orb entity
* Going back to EntityRenderDispatcher, we can see the code for rendering shadows was moved here from the renderer itself
if (this.gameOptions.entityShadows && this.renderShadows && entityRenderer14.shadowRadius > 0.0f && !entity.isInvisible()) {
double double22 = this.getSquaredDistanceToCamera(entity.getX(), entity.getY(), entity.getZ());
float float24 = (float)((1.0 - double22 / 256.0) * entityRenderer14.field_4672);
if (float24 > 0.0f) {
renderShadow(matrix, provider, entity, float24, tickDelta, this.world, entityRenderer14.shadowRadius);
}
}
* The last parameter is shadow radius, but to be sure we check, nd indeed it is reduced when the rendered entity is a baby
private static void renderShadow(MatrixStack matrix, VertexConsumerProvider provider, Entity entity, float float4, float tickDelta, WorldView world, float radius) {
float float8 = radius;
if (entity instanceof MobEntity) {
if (((MobEntity)entity).isBaby()) {
float8 *= 0.5f;
}
}
* float4 was a myster, but it's just passed down as-is and used to determine the opacity of the shadow!
float float16 = (float)((opacity - (y - pos.getY()) / 2.0) * 0.5 * world.getBrightness(pos));
if (float16 >= 0.0f) {
* Forgot this one
* This is all low-hanging fruit.
* EntityRenderDispatcher.shouldRender(entity, frustrum, x, y, z)
-> EntityRenderer.isVisible(entity, frustrum, x, y, z)
-> Entity.shouldRenderFrom(x, y, z)
@Environment(EnvType.CLIENT)
public boolean shouldRenderFrom(double x, double y, double z) {
double double8 = this.getX() - x;
double double10 = this.getY() - y;
double double12 = this.getZ() - z;
double double14 = double8 * double8 + double10 * double10 + double12 * double12;
return this.shouldRenderAtDistance(double14);
}
* More things we know
* This is set by calling entity.getLeaningPitch
* This is only overriden by CreeperEntityRenderer and returns a float computed from the fuse time.
The value is then passed to getOverlay where it's passed to OverlayTexture.getU(animationCounter).
This causes the creeper to flash white when active. The same method,
interestingly, will use the V to create the hurt/death overlay
OverlayTexture.packUv(
OverlayTexture.getU(animationCounter),
OverlayTexture.getV(entity.hurtTime > 0 || entity.deathTime > 0)
)
* The final patches
* xrayEnabled -> isGlowing
* Commit suggestions/name changes I missed during rebase
Co-Authored-By: Juuxel <6596629+Juuxel@users.noreply.github.com>
* Fix typos
* yaw -> tickDelta
Co-Authored-By: liach <7806504+liach@users.noreply.github.com>
* provider -> vertexConsumers
Co-Authored-By: liach <7806504+liach@users.noreply.github.com>
* matrix -> matrices
Co-Authored-By: liach <7806504+liach@users.noreply.github.com>
* Fixed some encorrect names
* entry -> matrices
* textureU/V -> u/v
* isBanner -> isBannerBlock
* frustrum -> frustum
Co-Authored-By: Gegy <gegy1000@gmail.com>
* Fix broken/changed mappings for 20w10a
* grammar
Co-Authored-By: liach <7806504+liach@users.noreply.github.com>
* Update mappings/net/minecraft/client/particle/ItemPickupParticle.mapping
Co-Authored-By: liach <7806504+liach@users.noreply.github.com>
Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>
Co-authored-by: liach <7806504+liach@users.noreply.github.com>
Co-authored-by: Gegy <gegy1000@gmail.com>
2020-03-27 07:06:32 -04:00
|
|
|
ARG 3 shadowRadius
|
2019-10-25 04:02:48 -04:00
|
|
|
METHOD method_18656 getYaw (Lnet/minecraft/class_2350;)F
|
2020-02-02 12:23:04 -05:00
|
|
|
ARG 0 direction
|
Renderer mappings (#988)
* part.render(matrix, vertices, light, overlay, red, green, blue, alpha)
* Fixed bad names
* Determined by the call to part.render(matrix, vertices, light, overlay)
which delegates to part.render(matrix, vertices, light, overlay, 1, 1, 1, 1)
* Now we extrapolate to everything that calls part.render(matrix, vertices, light, overlay)
Meanhile VertexConsumerProvider is
* Now we extrapolate to everything that cals pars.render(matrix, vertices, light, overlay, red, green, blue, alpha)
* This is not a render method! It sets the yaw and pitch on the skull
* Now we extrapolate to things that call mode.render(matrix, vertices, light, overlay, red, green, blue, alpha)
Not much to change there though
* These are known from EntityRenderDispatcher
* render calls renderLabelIfPresent
* Now we're looking at things which call EntityRenderDispatcher.render(entity, x, y, z, yaw, matrix, provider, light)
* In ClientPlayNetworkHandler.onItemPickupAnimation the second entity is gotten from packet.getCollectorEntityId and defaulted to the player if null. The first entity is an item entity or an experience orb entity
* Going back to EntityRenderDispatcher, we can see the code for rendering shadows was moved here from the renderer itself
if (this.gameOptions.entityShadows && this.renderShadows && entityRenderer14.shadowRadius > 0.0f && !entity.isInvisible()) {
double double22 = this.getSquaredDistanceToCamera(entity.getX(), entity.getY(), entity.getZ());
float float24 = (float)((1.0 - double22 / 256.0) * entityRenderer14.field_4672);
if (float24 > 0.0f) {
renderShadow(matrix, provider, entity, float24, tickDelta, this.world, entityRenderer14.shadowRadius);
}
}
* The last parameter is shadow radius, but to be sure we check, nd indeed it is reduced when the rendered entity is a baby
private static void renderShadow(MatrixStack matrix, VertexConsumerProvider provider, Entity entity, float float4, float tickDelta, WorldView world, float radius) {
float float8 = radius;
if (entity instanceof MobEntity) {
if (((MobEntity)entity).isBaby()) {
float8 *= 0.5f;
}
}
* float4 was a myster, but it's just passed down as-is and used to determine the opacity of the shadow!
float float16 = (float)((opacity - (y - pos.getY()) / 2.0) * 0.5 * world.getBrightness(pos));
if (float16 >= 0.0f) {
* Forgot this one
* This is all low-hanging fruit.
* EntityRenderDispatcher.shouldRender(entity, frustrum, x, y, z)
-> EntityRenderer.isVisible(entity, frustrum, x, y, z)
-> Entity.shouldRenderFrom(x, y, z)
@Environment(EnvType.CLIENT)
public boolean shouldRenderFrom(double x, double y, double z) {
double double8 = this.getX() - x;
double double10 = this.getY() - y;
double double12 = this.getZ() - z;
double double14 = double8 * double8 + double10 * double10 + double12 * double12;
return this.shouldRenderAtDistance(double14);
}
* More things we know
* This is set by calling entity.getLeaningPitch
* This is only overriden by CreeperEntityRenderer and returns a float computed from the fuse time.
The value is then passed to getOverlay where it's passed to OverlayTexture.getU(animationCounter).
This causes the creeper to flash white when active. The same method,
interestingly, will use the V to create the hurt/death overlay
OverlayTexture.packUv(
OverlayTexture.getU(animationCounter),
OverlayTexture.getV(entity.hurtTime > 0 || entity.deathTime > 0)
)
* The final patches
* xrayEnabled -> isGlowing
* Commit suggestions/name changes I missed during rebase
Co-Authored-By: Juuxel <6596629+Juuxel@users.noreply.github.com>
* Fix typos
* yaw -> tickDelta
Co-Authored-By: liach <7806504+liach@users.noreply.github.com>
* provider -> vertexConsumers
Co-Authored-By: liach <7806504+liach@users.noreply.github.com>
* matrix -> matrices
Co-Authored-By: liach <7806504+liach@users.noreply.github.com>
* Fixed some encorrect names
* entry -> matrices
* textureU/V -> u/v
* isBanner -> isBannerBlock
* frustrum -> frustum
Co-Authored-By: Gegy <gegy1000@gmail.com>
* Fix broken/changed mappings for 20w10a
* grammar
Co-Authored-By: liach <7806504+liach@users.noreply.github.com>
* Update mappings/net/minecraft/client/particle/ItemPickupParticle.mapping
Co-Authored-By: liach <7806504+liach@users.noreply.github.com>
Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>
Co-authored-by: liach <7806504+liach@users.noreply.github.com>
Co-authored-by: Gegy <gegy1000@gmail.com>
2020-03-27 07:06:32 -04:00
|
|
|
METHOD method_23185 getAnimationCounter (Lnet/minecraft/class_1309;F)F
|
2019-12-02 08:47:40 -05:00
|
|
|
ARG 1 entity
|
|
|
|
ARG 2 tickDelta
|
|
|
|
METHOD method_23622 getOverlay (Lnet/minecraft/class_1309;F)I
|
2021-06-07 09:40:13 -04:00
|
|
|
COMMENT {@return the packed overlay color for an entity} It is determined by the entity's death progress and whether the entity is flashing.
|
2019-12-02 08:47:40 -05:00
|
|
|
ARG 0 entity
|
|
|
|
ARG 1 whiteOverlayProgress
|
2020-04-02 13:40:17 -04:00
|
|
|
METHOD method_24302 getRenderLayer (Lnet/minecraft/class_1309;ZZZ)Lnet/minecraft/class_1921;
|
2020-02-02 12:23:04 -05:00
|
|
|
COMMENT Gets the render layer appropriate for rendering the passed entity. Returns null if the entity should not be rendered.
|
|
|
|
ARG 1 entity
|
|
|
|
ARG 2 showBody
|
|
|
|
ARG 3 translucent
|
2020-07-28 20:40:12 -04:00
|
|
|
ARG 4 showOutline
|
2020-03-11 11:09:33 -04:00
|
|
|
METHOD method_25450 isShaking (Lnet/minecraft/class_1309;)Z
|
2021-06-07 09:40:13 -04:00
|
|
|
COMMENT {@return if this entity is shaking} Specifically, in the way a zombie villager,
|
Renderer mappings (#988)
* part.render(matrix, vertices, light, overlay, red, green, blue, alpha)
* Fixed bad names
* Determined by the call to part.render(matrix, vertices, light, overlay)
which delegates to part.render(matrix, vertices, light, overlay, 1, 1, 1, 1)
* Now we extrapolate to everything that calls part.render(matrix, vertices, light, overlay)
Meanhile VertexConsumerProvider is
* Now we extrapolate to everything that cals pars.render(matrix, vertices, light, overlay, red, green, blue, alpha)
* This is not a render method! It sets the yaw and pitch on the skull
* Now we extrapolate to things that call mode.render(matrix, vertices, light, overlay, red, green, blue, alpha)
Not much to change there though
* These are known from EntityRenderDispatcher
* render calls renderLabelIfPresent
* Now we're looking at things which call EntityRenderDispatcher.render(entity, x, y, z, yaw, matrix, provider, light)
* In ClientPlayNetworkHandler.onItemPickupAnimation the second entity is gotten from packet.getCollectorEntityId and defaulted to the player if null. The first entity is an item entity or an experience orb entity
* Going back to EntityRenderDispatcher, we can see the code for rendering shadows was moved here from the renderer itself
if (this.gameOptions.entityShadows && this.renderShadows && entityRenderer14.shadowRadius > 0.0f && !entity.isInvisible()) {
double double22 = this.getSquaredDistanceToCamera(entity.getX(), entity.getY(), entity.getZ());
float float24 = (float)((1.0 - double22 / 256.0) * entityRenderer14.field_4672);
if (float24 > 0.0f) {
renderShadow(matrix, provider, entity, float24, tickDelta, this.world, entityRenderer14.shadowRadius);
}
}
* The last parameter is shadow radius, but to be sure we check, nd indeed it is reduced when the rendered entity is a baby
private static void renderShadow(MatrixStack matrix, VertexConsumerProvider provider, Entity entity, float float4, float tickDelta, WorldView world, float radius) {
float float8 = radius;
if (entity instanceof MobEntity) {
if (((MobEntity)entity).isBaby()) {
float8 *= 0.5f;
}
}
* float4 was a myster, but it's just passed down as-is and used to determine the opacity of the shadow!
float float16 = (float)((opacity - (y - pos.getY()) / 2.0) * 0.5 * world.getBrightness(pos));
if (float16 >= 0.0f) {
* Forgot this one
* This is all low-hanging fruit.
* EntityRenderDispatcher.shouldRender(entity, frustrum, x, y, z)
-> EntityRenderer.isVisible(entity, frustrum, x, y, z)
-> Entity.shouldRenderFrom(x, y, z)
@Environment(EnvType.CLIENT)
public boolean shouldRenderFrom(double x, double y, double z) {
double double8 = this.getX() - x;
double double10 = this.getY() - y;
double double12 = this.getZ() - z;
double double14 = double8 * double8 + double10 * double10 + double12 * double12;
return this.shouldRenderAtDistance(double14);
}
* More things we know
* This is set by calling entity.getLeaningPitch
* This is only overriden by CreeperEntityRenderer and returns a float computed from the fuse time.
The value is then passed to getOverlay where it's passed to OverlayTexture.getU(animationCounter).
This causes the creeper to flash white when active. The same method,
interestingly, will use the V to create the hurt/death overlay
OverlayTexture.packUv(
OverlayTexture.getU(animationCounter),
OverlayTexture.getV(entity.hurtTime > 0 || entity.deathTime > 0)
)
* The final patches
* xrayEnabled -> isGlowing
* Commit suggestions/name changes I missed during rebase
Co-Authored-By: Juuxel <6596629+Juuxel@users.noreply.github.com>
* Fix typos
* yaw -> tickDelta
Co-Authored-By: liach <7806504+liach@users.noreply.github.com>
* provider -> vertexConsumers
Co-Authored-By: liach <7806504+liach@users.noreply.github.com>
* matrix -> matrices
Co-Authored-By: liach <7806504+liach@users.noreply.github.com>
* Fixed some encorrect names
* entry -> matrices
* textureU/V -> u/v
* isBanner -> isBannerBlock
* frustrum -> frustum
Co-Authored-By: Gegy <gegy1000@gmail.com>
* Fix broken/changed mappings for 20w10a
* grammar
Co-Authored-By: liach <7806504+liach@users.noreply.github.com>
* Update mappings/net/minecraft/client/particle/ItemPickupParticle.mapping
Co-Authored-By: liach <7806504+liach@users.noreply.github.com>
Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>
Co-authored-by: liach <7806504+liach@users.noreply.github.com>
Co-authored-by: Gegy <gegy1000@gmail.com>
2020-03-27 07:06:32 -04:00
|
|
|
COMMENT zombie, husk, or piglin undergoing conversion shakes.
|
2020-03-11 11:09:33 -04:00
|
|
|
ARG 1 entity
|
2021-09-17 11:18:49 -04:00
|
|
|
METHOD method_38563 shouldFlipUpsideDown (Lnet/minecraft/class_1309;)Z
|
|
|
|
ARG 0 entity
|
2019-06-28 17:55:20 -04:00
|
|
|
METHOD method_4039 getLyingAngle (Lnet/minecraft/class_1309;)F
|
2020-02-02 12:23:04 -05:00
|
|
|
ARG 1 entity
|
2019-09-27 12:23:24 -04:00
|
|
|
METHOD method_4042 scale (Lnet/minecraft/class_1309;Lnet/minecraft/class_4587;F)V
|
2019-04-04 18:04:19 -04:00
|
|
|
ARG 1 entity
|
2020-02-02 12:23:04 -05:00
|
|
|
ARG 2 matrices
|
2020-03-11 11:09:33 -04:00
|
|
|
ARG 3 amount
|
2019-06-28 17:55:20 -04:00
|
|
|
METHOD method_4044 getHandSwingProgress (Lnet/minecraft/class_1309;F)F
|
2019-02-20 16:01:25 -05:00
|
|
|
ARG 1 entity
|
2019-06-28 17:55:20 -04:00
|
|
|
ARG 2 tickDelta
|
2020-02-02 12:23:04 -05:00
|
|
|
METHOD method_4045 getAnimationProgress (Lnet/minecraft/class_1309;F)F
|
|
|
|
COMMENT This value is passed to other methods when calculating angles for animation.
|
|
|
|
COMMENT It's typically just the sum of the entity's age (in ticks) and the passed in tickDelta.
|
2019-02-20 16:01:25 -05:00
|
|
|
ARG 1 entity
|
2019-06-28 17:55:20 -04:00
|
|
|
ARG 2 tickDelta
|
|
|
|
METHOD method_4046 addFeature (Lnet/minecraft/class_3887;)Z
|
2020-02-02 12:23:04 -05:00
|
|
|
ARG 1 feature
|
Renderer mappings (#988)
* part.render(matrix, vertices, light, overlay, red, green, blue, alpha)
* Fixed bad names
* Determined by the call to part.render(matrix, vertices, light, overlay)
which delegates to part.render(matrix, vertices, light, overlay, 1, 1, 1, 1)
* Now we extrapolate to everything that calls part.render(matrix, vertices, light, overlay)
Meanhile VertexConsumerProvider is
* Now we extrapolate to everything that cals pars.render(matrix, vertices, light, overlay, red, green, blue, alpha)
* This is not a render method! It sets the yaw and pitch on the skull
* Now we extrapolate to things that call mode.render(matrix, vertices, light, overlay, red, green, blue, alpha)
Not much to change there though
* These are known from EntityRenderDispatcher
* render calls renderLabelIfPresent
* Now we're looking at things which call EntityRenderDispatcher.render(entity, x, y, z, yaw, matrix, provider, light)
* In ClientPlayNetworkHandler.onItemPickupAnimation the second entity is gotten from packet.getCollectorEntityId and defaulted to the player if null. The first entity is an item entity or an experience orb entity
* Going back to EntityRenderDispatcher, we can see the code for rendering shadows was moved here from the renderer itself
if (this.gameOptions.entityShadows && this.renderShadows && entityRenderer14.shadowRadius > 0.0f && !entity.isInvisible()) {
double double22 = this.getSquaredDistanceToCamera(entity.getX(), entity.getY(), entity.getZ());
float float24 = (float)((1.0 - double22 / 256.0) * entityRenderer14.field_4672);
if (float24 > 0.0f) {
renderShadow(matrix, provider, entity, float24, tickDelta, this.world, entityRenderer14.shadowRadius);
}
}
* The last parameter is shadow radius, but to be sure we check, nd indeed it is reduced when the rendered entity is a baby
private static void renderShadow(MatrixStack matrix, VertexConsumerProvider provider, Entity entity, float float4, float tickDelta, WorldView world, float radius) {
float float8 = radius;
if (entity instanceof MobEntity) {
if (((MobEntity)entity).isBaby()) {
float8 *= 0.5f;
}
}
* float4 was a myster, but it's just passed down as-is and used to determine the opacity of the shadow!
float float16 = (float)((opacity - (y - pos.getY()) / 2.0) * 0.5 * world.getBrightness(pos));
if (float16 >= 0.0f) {
* Forgot this one
* This is all low-hanging fruit.
* EntityRenderDispatcher.shouldRender(entity, frustrum, x, y, z)
-> EntityRenderer.isVisible(entity, frustrum, x, y, z)
-> Entity.shouldRenderFrom(x, y, z)
@Environment(EnvType.CLIENT)
public boolean shouldRenderFrom(double x, double y, double z) {
double double8 = this.getX() - x;
double double10 = this.getY() - y;
double double12 = this.getZ() - z;
double double14 = double8 * double8 + double10 * double10 + double12 * double12;
return this.shouldRenderAtDistance(double14);
}
* More things we know
* This is set by calling entity.getLeaningPitch
* This is only overriden by CreeperEntityRenderer and returns a float computed from the fuse time.
The value is then passed to getOverlay where it's passed to OverlayTexture.getU(animationCounter).
This causes the creeper to flash white when active. The same method,
interestingly, will use the V to create the hurt/death overlay
OverlayTexture.packUv(
OverlayTexture.getU(animationCounter),
OverlayTexture.getV(entity.hurtTime > 0 || entity.deathTime > 0)
)
* The final patches
* xrayEnabled -> isGlowing
* Commit suggestions/name changes I missed during rebase
Co-Authored-By: Juuxel <6596629+Juuxel@users.noreply.github.com>
* Fix typos
* yaw -> tickDelta
Co-Authored-By: liach <7806504+liach@users.noreply.github.com>
* provider -> vertexConsumers
Co-Authored-By: liach <7806504+liach@users.noreply.github.com>
* matrix -> matrices
Co-Authored-By: liach <7806504+liach@users.noreply.github.com>
* Fixed some encorrect names
* entry -> matrices
* textureU/V -> u/v
* isBanner -> isBannerBlock
* frustrum -> frustum
Co-Authored-By: Gegy <gegy1000@gmail.com>
* Fix broken/changed mappings for 20w10a
* grammar
Co-Authored-By: liach <7806504+liach@users.noreply.github.com>
* Update mappings/net/minecraft/client/particle/ItemPickupParticle.mapping
Co-Authored-By: liach <7806504+liach@users.noreply.github.com>
Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>
Co-authored-by: liach <7806504+liach@users.noreply.github.com>
Co-authored-by: Gegy <gegy1000@gmail.com>
2020-03-27 07:06:32 -04:00
|
|
|
METHOD method_4056 isVisible (Lnet/minecraft/class_1309;)Z
|
2020-02-02 12:23:04 -05:00
|
|
|
ARG 1 entity
|
2019-09-27 12:23:24 -04:00
|
|
|
METHOD method_4058 setupTransforms (Lnet/minecraft/class_1309;Lnet/minecraft/class_4587;FFF)V
|
2019-02-20 16:01:25 -05:00
|
|
|
ARG 1 entity
|
2020-02-02 12:23:04 -05:00
|
|
|
ARG 2 matrices
|
|
|
|
ARG 3 animationProgress
|
|
|
|
ARG 4 bodyYaw
|
|
|
|
ARG 5 tickDelta
|