- Fixed incorrect parameter names
- Renamed "leggingsModel", "bodyModel" to "innerModel", "outerModel".
For example, the player renderer just passes in the inner and outer layer
of its model.
- Renamed "usesSecondLayer" -> "usesInnerModel" as that seems more
relevant to the code. That is also what determines in the first place
that the inner model is used for leggings.
* 22w12a stuff
* fixes from @apple502j and a bit more
* Update mappings/net/minecraft/block/entity/SculkShriekerWarningManager.mapping
Co-authored-by: apple502j <33279053+apple502j@users.noreply.github.com>
Co-authored-by: apple502j <33279053+apple502j@users.noreply.github.com>
* this is all i can bear to do for now, im tired
* i lied
* Update DispenserBehavior.mapping
* have a little more, as a treat
* fixes
* *more* stuff
* more animation stuff
* model parts
* initAndGetDefault
y'all have some weird defaults mojang
When you send the entity metadata packet with the appropriate update to the client
the panda's behavior can be better described as sitting up rather than being scared
* Fix some setters not matching fields and params
* Revert params with current prefix
* Rename targetPool to target
to match the setter in JigsawBlockEntity
* Revert more renames
* Revert setInvStackList -> setInventory
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Map marker entities
* Reword the documentation for the EmptyEntityRenderer class to highlight that it does not render anything
Co-authored-by: liach <7806504+liach@users.noreply.github.com>
Co-authored-by: liach <7806504+liach@users.noreply.github.com>
* Entity model part constants
* "constants" -> "names"
* add target methods but it still doesn't work
* add even more target methods, but it still still doesn't work
* finally (thx liach)
* 48a things
* stuff
* Apply suggestions from code review
Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>
* just to get checks running again
* Revert "just to get checks running again"
This reverts commit 509ab81d80.
Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>
* Update all the models fields that come from Mojang's json code
* Unswap tailAngle and spikeExtension fields
* Fill in missing names in MathHelper
* Apply suggestions from code review
Co-authored-by: YanisBft <doublecraft.official@gmail.com>
* More code review fixes
Co-authored-by: YanisBft <doublecraft.official@gmail.com>
* Things
* Update AbstractCauldronBlock.mapping
* a few more things
* Create EntityModelLayers.mapping
* Update MinecraftVersion.mapping
* Update Oxidizable.mapping
* Map unmapped fields that have getter methods
* Fix the parts field in GhastEntityModel using the same name as its getter method
Co-authored-by: liach <7806504+liach@users.noreply.github.com>
* Update outdated getter method names
Co-authored-by: liach <7806504+liach@users.noreply.github.com>
* Map some 20w15a new classes (entities, enchantments)
Signed-off-by: liach <liach@users.noreply.github.com>
* Some javadocs
* Just refer by id
Signed-off-by: liach <liach@users.noreply.github.com>
* Fix bad class name
Signed-off-by: liach <liach@users.noreply.github.com>
Co-authored-by: liach <liach@users.noreply.github.com>
* 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>
* Pick up #1026 and adjustments
ArmorFeatureRenderer, BipedEntityModel and some player stuff
Parrot entity rendering fixes
At the moment, I don't know the difference between method_17110 and method_17111.
method_17110 -> animateModel
Still a provisional name.
Finish the other feature renderers (except CapeFeatureRenderer)
Name methods involving armor stands
Work on Ender Dragon-related things
overlay{Message, Tinted} -> {message, tinted}
Add docs for ClientPlayerEntity#wateriness (now wetness)
ClientPlayerEntity#getVisibilityReductionFromWater -> getScaledWetness
Actually add javadocs
newHealth -> health
DragonFireballEntityRenderer#FIREBALL -> LAYER
* Update mappings/net/minecraft/client/render/RenderLayer.mapping
Co-authored-by: Kyarei <uruwi@protonmail.com>