Commit Graph

51 Commits

Author SHA1 Message Date
Yanis48 70b1474a32
Random client mappings (#1616)
* Random client mappings

* Update MinecraftClient.mapping

* Update gradle.properties
2020-07-29 01:40:12 +01:00
modmuss50 0c14fa6444 20w14a 2020-04-02 18:40:17 +01:00
­Sollace 3d228282e6
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 11:06:32 +00:00
liach 7bd162989d
Pick up rendering stuff and dragon stuff (#1163)
* 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>
2020-03-11 15:09:33 +00:00
­Sollace 1e96d04898
1.15.2 EntityRenderer changes (#1079)
* 1.15.2 EntityRenderer changes

* wtf Enigma

* Added the P

* "Swap the usage of the value first"

* See my new dog color mah!?

* "S" that ws meant to be an "S"
2020-02-02 17:23:04 +00:00
Pyrofab 32e934eac7
LivingEntity rendering fix (#1080)
* Entity#canSeePlayer(1) -> isInvisibleTo

* LivingEntityRenderer#method_4056(2) -> shouldRender

* LivingEntityRenderer#method_4056(2) -> isVisible

* EntityRenderer#render(3)[2 = ] -> yaw

* EntityRenderer#render(3)[3 = ] -> tickDelta

* EntityRenderer#render(3)[5 = ] -> vertexConsumers

* EntityRenderer#render(3)[6 = ] -> light

* Pick better names

* Remove overlaps

* Fix merge conflicts

* Actually remove overlap
2020-01-31 10:14:57 +00:00
modmuss50 b3d3023795 1.15-pre4 2019-12-03 13:35:46 +00:00
Runemoro 966033b532 More rendering mappings (#986)
* More rendering mappings

* Even more rendering mappings

* Update mappings/net/minecraft/client/render/OverlayTexture.mapping

Co-Authored-By: liach <7806504+liach@users.noreply.github.com>

* Update mappings/net/minecraft/client/render/OverlayTexture.mapping

Co-Authored-By: liach <7806504+liach@users.noreply.github.com>

* Fix HashStrategy removed in last PR

* Fixes by liach
2019-12-02 13:47:40 +00:00
Siphalor 194e42daff Mapped entity rendering methods/classes & options screens (#913)
* Mapped entity rendering methods and classes & options screens

* Fixed Knit's issues and implemented liach's suggestions

* Removed strange leftover obf stubs (I blame Knit)

* Mapped some more stuff from AnimalModel

* Adapt some stuff from Runemoro

* Some more Runemoro

* Another two fixes

* Unmap unobfuscated mapping

Co-Authored-By: liach <7806504+liach@users.noreply.github.com>

* Shorten dragon

by liach

Co-Authored-By: liach <7806504+liach@users.noreply.github.com>

* Shorten biped model

by liach

Co-Authored-By: liach <7806504+liach@users.noreply.github.com>

* Shorten another biped model

Co-Authored-By: liach <7806504+liach@users.noreply.github.com>
2019-10-25 09:02:48 +01:00
modmuss50 052e77acc0 19w39a 2019-09-27 17:23:24 +01:00
modmuss50 2565f0b45b 19w38a 2019-09-18 16:17:05 +01:00
Adrian Siekierka 1a6f261a2e The Great Intermediary Update, Part 1 2019-06-28 23:55:20 +02:00
modmuss50 b27778997a 1.14.3-pre3 2019-06-19 18:48:53 +01:00
modmuss50 8554a5ae8c 1.14.3-pre2 2019-06-07 12:45:25 +01:00
Adrian Siekierka bdbf125b33 1.14.3-pre1 2019-06-03 18:48:18 +02:00
modmuss50 fa072139bf 1.14.1 Pre-Release 1 2019-05-07 17:05:49 +01:00
Adrian Siekierka 465a1e3701
entity renderer naming consistency fixes (#653) 2019-04-29 08:54:17 +02:00
modmuss50 de13dda07c 1.14 Pre-Release 5 2019-04-18 22:01:39 +01:00
modmuss50 782b07c692 1.14 Pre-Release 4 2019-04-17 17:41:25 +01:00
Adrian Siekierka 13943c582b update to 1.14 Pre-Release 3 2019-04-16 17:51:03 +02:00
modmuss50 2fd19127ea 1.14 Pre-Release 2 2019-04-12 15:38:24 +01:00
modmuss50 b13686aed0 1.14 Pre-Release 1 2019-04-10 16:36:17 +01:00
modmuss50 0e8b18ad3f 19w14b 2019-04-05 17:03:47 +01:00
Runemoro fca78f74f4 More mappings 2019-04-04 18:04:19 -04:00
modmuss50 845be1d2ec 19w14a 2019-04-03 17:16:41 +01:00
Runemoro 4ebfe3c891 Rendering mappings 2019-03-31 20:45:27 -04:00
modmuss50 53620837bf 19w13a 2019-03-27 18:35:10 +00:00
modmuss50 b9285540bc 19w12a 2019-03-20 17:56:26 +00:00
modmuss50 eef3d973f2 Save in enigma, removes some propagated method names 2019-03-14 16:26:35 +00:00
modmuss50 e3d24ae102 19w11b 2019-03-14 15:39:51 +00:00
Adrian Siekierka 333e59da73 19w11a 2019-03-14 13:57:09 +01:00
asie 4b91cfbcf5 19w09a 2019-02-27 19:17:22 +01:00
Adrian Siekierka c25fcbb177 19w08b 2019-02-21 19:19:18 +01:00
Adrian Siekierka d1435774dc fix mappings 2019-02-20 22:01:25 +01:00
Adrian Siekierka 66156a5471 update to 19w08a 2019-02-20 21:49:23 +01:00
modmuss50 8a2af8044e 19w07a 2019-02-13 17:35:08 +00:00
Adrian Siekierka e2a1bba0b6 19w06a 2019-02-06 21:22:24 +01:00
Adrian Siekierka 1bfe80a06a update to 19w05a 2019-01-30 18:48:39 +01:00
Adrian Siekierka 995df6291a update to 19w04a/Enigma 0.13.x 2019-01-24 20:10:22 +01:00
modmuss50 347fd572c2 19w03a 2019-01-16 18:24:40 +00:00
Adrian Siekierka bf62f29ddf update to 19w02a 2019-01-09 18:20:38 +01:00
Adrian Siekierka a2c2c754e9 autofixes 2018-12-22 19:26:44 +01:00
Erlend Åmdal 79fee4ac00 Entity/Feature rendering (#339) 2018-12-22 19:20:49 +01:00
Tschipp f03b60e26f Some Rendering and Model names (#322) 2018-12-22 19:15:04 +01:00
liach 249b75d84a Many villager-related mappings, some trade related ones and some new (#280) 2018-12-20 09:45:46 +01:00
Adrian Siekierka e9ccf701a7 port to 18w50a 2018-12-12 18:12:26 +01:00
Gegy d1c21f67b7 Model and debug renderer mapping (#261) 2018-12-11 09:15:18 +01:00
Adrian Siekierka 245ce1dd92 update to 18w49a 2018-12-05 15:13:16 +01:00
Adrian Siekierka 50764e1853 update to 18w48a 2018-11-29 21:10:38 +01:00
Adrian Siekierka 13ed3f8e2c update to 18w47b 2018-11-27 19:50:51 +01:00
asie 895ed3ad61 The Great Suffixification 2018-11-27 19:42:03 +01:00