* Map LogoDrawer constants
* Map constants in PlayerSkinDrawer
Since we can’t consult mojmap, the precise meanings of the various
‘8’ constants will remain elusive. The mappings in this commit
are inferred from the position of the ‘40’ (FACE_OVERLAY_X).
* Map more GUI constants
* Add parameter mapping for SpectatorHud.cycleSlot
* Map two Particle fields
* Map the rest of the Frustum class
* Map WorldRenderer
* Add mappings for debug renderers and entity models
* SinglePartEntityModel.ZERO → TEMP
This is not always zero; rather, it is used for temporary storage.
* Add more mappings for SplashTextRenderer
* Fix javadocs for SplashText.render’s alpha parameter
* Map screen handler constants
* Map interactivity parameters for structure blocks
* Add mappings for various fixes
* Implement suggested changes
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Shnupbups <shnupbups@gmail.com>
* 23w07a stuff
Got a bit carried away...
Some names aren't ideal, and there's still more that could be done, so feedback is appreciated
* More + suggestions
* Refactor NBT parameter names and a bit more.
* Apply suggestions from code review.
Co-authored-by: liach <7806504+liach@users.noreply.github.com>
* Apply more suggestions from code review.
* MobEntity leashTag stuff -> leashNbt
Co-authored-by: liach <7806504+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>
* Map reverse portal particle
and many other missing fields in particle/factories
Signed-off-by: liach <liach@users.noreply.github.com>
* Update mappings/net/minecraft/client/particle/CurrentDownParticle.mapping
Co-Authored-By: Joseph Burton <burtonjae@hotmail.co.uk>
Co-authored-by: liach <liach@users.noreply.github.com>
Co-authored-by: Joseph Burton <burtonjae@hotmail.co.uk>
* Enchantments, vines, particles 11a
Fixes#1084 as well
* Detail on what the ench method does
Signed-off-by: liach <liach@users.noreply.github.com>
* Now this thing has a builder ye
Signed-off-by: liach <liach@users.noreply.github.com>
* Update mappings/net/minecraft/world/gen/feature/TwistingVinesFeature.mapping
* Update mappings/net/minecraft/world/gen/feature/TwistingVinesFeature.mapping
* Rename method sin weeping vine feature as requested by @supercoder7979
Signed-off-by: liach <liach@users.noreply.github.com>
* Vines -> VineLogic
Signed-off-by: liach <liach@users.noreply.github.com>
Co-authored-by: liach <liach@users.noreply.github.com>
* Refactor rendering
* Revert #929 and map more things
* Fixes by liach
* Revert bufferBuilder -> buffer in fields too
* Fixes
* Update mappings/net/minecraft/util/MessageQueue.mapping
Co-Authored-By: liach <7806504+liach@users.noreply.github.com>
* Update mappings/net/minecraft/util/MessageQueue.mapping
Co-Authored-By: liach <7806504+liach@users.noreply.github.com>
* Suggestions by Player
* Fix some debug renderer names
* More mappings
* Fix
* Fixes by Player
* Improve BufferBuilderStorage names
* Stuff
* more stuff
* even more stuff
* removed an accidental thing
* stuff 4: electric boogaloo
* Update BlockState.mapping
* Stuff VI: The Search for Stuff V
* Update NativeImage.mapping
* removed things already mapped by Rune's PR
Namely `net/minecraft/realms/YesNoScreen' (`com/mojang/realmsclient/gui/screens/RealmsConfirmScreen` in Rune's PR), `net/minecraft/realms/RealmsError' (`com/mojang/realmsclient/client/RealmsError` in Rune's PR), and `net/minecraft/realms/InvalidClientScreen' (`com/mojang/realmsclient/gui/screens/RealmsClientOutdatedScreen` in Rune's PR).
* Stuff: The Final Stuffening
* Stuff: Revengeance
* Stuff Episode IX: Endgame