Commit Graph

36 Commits

Author SHA1 Message Date
LambdAurora a0ec4231f8
Entity and entity models documentations (#2431)
* Map some axolotl stuff and start work on entity and entity models documentation.

* Improve entity models documentation.

* Update mappings/net/minecraft/client/model/Model.mapping

Co-authored-by: liach <7806504+liach@users.noreply.github.com>

* More entity model documentation.

* Axolotl brain and tasks.

* Update mappings/net/minecraft/client/render/entity/model/CatEntityModel.mapping

Co-authored-by: liach <7806504+liach@users.noreply.github.com>

Co-authored-by: liach <7806504+liach@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-29 11:52:11 +01:00
LambdAurora 3d45004495
Map some stuff in entity models. (#2267)
* Map some stuff in entity models.

* Update mappings/net/minecraft/client/render/entity/model/ModelWithHat.mapping

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>
2021-04-03 13:30:15 +01:00
­Sollace c0a046c665
Model part names (#1900)
* 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>
2020-12-03 13:51:45 +00:00
Thalia Nero e0df01cad6
Entity rendering (#1861)
* Map entity model classes.

* Map new stuff in entity renderers.

* - EntityModelParts -> EntityModels
- ModelPartGroup -> ModelPartData
- ModelPartData -> ModelPartDataNode
- TexturedModelPartGroup -> TexturedModelPartData

* Apply suggestions from code review

Co-authored-by: Gegy <gegy1000@gmail.com>

* Apply other suggestions

* Update mappings/net/minecraft/client/model/TexturedModelData.mapping

Co-authored-by: YanisBft <doublecraft.official@gmail.com>

* Remap *PartData -> *ModelData, move Dilation to client.util.math

* Update crobbed mapping.

Co-authored-by: Gegy <gegy1000@gmail.com>
Co-authored-by: YanisBft <doublecraft.official@gmail.com>
2020-11-12 08:57:40 +00:00
modmuss50 c91f482141 20w45a 2020-11-04 20:44:22 +00: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
modmuss50 a2adfae9eb Remove a conflicting method
This time on the right branch
2019-11-21 19:43:37 +00:00
modmuss50 9fb64b9b26 1.15-pre1 2019-11-21 19:13:18 +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 841e352c61 19w41a 2019-10-09 18:17:26 +01:00
modmuss50 052e77acc0 19w39a 2019-09-27 17:23:24 +01:00
modmuss50 2565f0b45b 19w38a 2019-09-18 16:17:05 +01:00
modmuss50 84adfb1d6c Merged #825
Squashed commit of the following:

commit ce2f24233b
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Wed Aug 28 20:43:17 2019 +0100

    Fix typo

commit ba7ca63d44
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Fri Aug 23 00:42:05 2019 +0100

    Fix typo + missing rename from previous commit

commit c63132b3b8
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Fri Aug 23 00:37:33 2019 +0100

    Rename variable names in 'natural language order'

commit b5c1f164f8
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 05:33:09 2019 +0100

    class_597 METHOD init ARG 2 -> scale

commit 728bec6b41
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 05:31:06 2019 +0100

    class_597 METHOD init ARG 1 -> ySize

commit d3dc2b2ee3
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 05:26:33 2019 +0100

    method_2800 -> getHead

commit d1aca82776
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 05:25:30 2019 +0100

    field_3356 -> finRight

commit ca9476050e
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 05:25:09 2019 +0100

    field_3351 -> finLeft

commit a88727b5ab
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 05:21:28 2019 +0100

    field_3355 -> finTop

commit 1abd1bd4bc
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 05:19:49 2019 +0100

    field_3350 -> finTail

commit 8b2faed2cf
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 05:13:05 2019 +0100

    field_3352 -> mouth

commit 4162946189
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 05:09:36 2019 +0100

    field_3354 -> head

commit 62ea7ab62f
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 05:08:36 2019 +0100

    field_3353 -> body

commit 84aeb8284b
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 05:04:36 2019 +0100

    field_3347 -> wingRight

commit 394c90e230
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 05:04:03 2019 +0100

    field_3341 -> wingLeft

commit 9e177b49a6
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 05:01:56 2019 +0100

    field_3343 -> legRight

commit cf37239d25
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 05:01:22 2019 +0100

    field_3345 -> legLeft

commit 5b16409623
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 04:58:24 2019 +0100

    field_3346 -> body

commit 41157a8d86
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 04:55:20 2019 +0100

    field_3342 -> wattle

commit 036c309d3b
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 04:52:43 2019 +0100

    field_3340 -> beak

commit cc948d7ca9
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 04:48:21 2019 +0100

    method_2798 -> getLid

commit a4bba1e1f0
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 04:47:17 2019 +0100

    method_2799 -> render

commit 21fc1342cf
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 04:45:52 2019 +0100

    class_582 METHOD init ARG 1 -> scale

commit b60f47e4f1
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 04:35:08 2019 +0100

    method_17073 ARG 6 -> scale

commit f5821fd949
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 04:33:51 2019 +0100

    method_17072 ARG 6 -> scale

commit 3f59c2482d
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 04:27:34 2019 +0100

    method_2836 ARG 7 -> scale

commit b3308599e8
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 04:24:01 2019 +0100

    field_3326 -> bottom

commit 50501302e9
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 04:03:07 2019 +0100

    field_3328 -> rods

commit 9b019bd627
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 04:00:18 2019 +0100

    field_3329 -> head

commit 94954e9dc5
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 03:58:14 2019 +0100

    field_3318 -> part2

commit e0da88d86a
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 03:57:41 2019 +0100

    field_3316 -> part1

commit f91e3b2473
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 03:52:49 2019 +0100

    field_3317 -> legs

commit a7b2e36c57
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 03:52:12 2019 +0100

    method_2795 ARG 1 -> visible

commit 2ee962f9d9
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 03:48:12 2019 +0100

    field_3324 -> wingLeftTip

commit 6c89361dea
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 03:47:38 2019 +0100

    field_3319 -> wingRightTip

commit 18289d89b9
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 03:45:57 2019 +0100

    field_3320 -> wingLeft

commit b7cfac8702
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 03:43:41 2019 +0100

    field_3322 -> wingRight

commit 66203f9137
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 03:39:49 2019 +0100

    field_3323 -> body

commit d8344db158
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 03:39:19 2019 +0100

    field_3321 -> head

commit e5c8a26170
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 03:17:37 2019 +0100

    method_2793 -> render

commit 5a86e9f41a
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 03:15:37 2019 +0100

    method_2792 -> getBanner

commit f6b577fe9b
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 03:14:42 2019 +0100

    method_2791 -> getStickVertical

commit 2d53a588f3
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 03:13:21 2019 +0100

    field_3310 -> stickHorizontal

commit 42c6c02edb
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 03:11:47 2019 +0100

    field_3311 -> stickVertical

commit 4117732d33
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 03:10:13 2019 +0100

    field_3309 -> banner

commit 9cf06abcbb
Author: YummyLoop <12478030+YummyLoop@users.noreply.github.com>
Date:   Mon Aug 19 02:59:03 2019 +0100

    method_17790 -> isAttacking
2019-09-12 14:36:00 +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
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
modmuss50 845be1d2ec 19w14a 2019-04-03 17:16:41 +01:00
modmuss50 53620837bf 19w13a 2019-03-27 18:35:10 +00:00
modmuss50 b9285540bc 19w12a 2019-03-20 17:56:26 +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
Adrian Siekierka c25fcbb177 19w08b 2019-02-21 19:19:18 +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
Runemoro 20ffe31834 Block entities and blocks (#417) 2019-01-24 17:08:22 +01:00