Commit Graph

111 Commits

Author SHA1 Message Date
liach 7180726b1f
Fix javadoc warnings (#1286)
Signed-off-by: liach <liach@users.noreply.github.com>

Co-authored-by: liach <liach@users.noreply.github.com>
2020-04-18 14:55:18 +01:00
modmuss50 863b0e905c 20w16a 2020-04-15 16:34:32 +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
LambdAurora f20fc8f630
Rename every view argument to world and random additions. (#1114)
* WIP on view argument nuking.

* More mappings.

* Nuke remaining view arguments.

* FeatureRendererContext#getTexture() ARG 1 wolf -> entity
2020-02-17 13:48:43 +00:00
liach 805396c016 1.15 pre4 1 (#994)
* Some missing fields

Signed-off-by: liach <liach@users.noreply.github.com>

* Few more stuff

Signed-off-by: liach <liach@users.noreply.github.com>

* Remove problematic jd info
2019-12-04 23:00:17 +00:00
modmuss50 b3d3023795 1.15-pre4 2019-12-03 13:35:46 +00:00
modmuss50 89b749da2a Update enigma for Javadoc support.
Mappings were re-written storing the inner classes at the end of the file.
2019-12-02 13:55:18 +00:00
­Sollace 018b4f2cda Quarternion mappings (#972)
* Mapped some missing names in Vector3f and Quaternion

* Mapped WorldRenderer and most of RenderLayer
2019-12-02 13:49:14 +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
liach 5bebf85492 pre3 new classes (#989)
Signed-off-by: liach <liach@users.noreply.github.com>
2019-11-29 20:40:18 +00:00
Runemoro bf81b47a6b Rendering mappings (#985)
* Rendering mappings

* Undo ColorResolver -> ColorProvider, it's an unobfuscated class!

* Update mappings/net/minecraft/client/render/debug/BeeDebugRenderer.mapping

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

* Update mappings/net/minecraft/client/render/debug/BeeDebugRenderer.mapping

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

* Fixes by liach

* Fix
2019-11-26 23:53:20 +00:00
liach d0f836da8e Some stuff for 1.15 pre 1 and pre2 (#980)
* Some stuff for 1.15 pre 1

wood type or sign type? it is only used by signs.

Signed-off-by: liach <liach@users.noreply.github.com>

* A few more stuff

Signed-off-by: liach <liach@users.noreply.github.com>

* bits of stuff

Signed-off-by: liach <liach@users.noreply.github.com>

* Call it a sign type

Signed-off-by: liach <liach@users.noreply.github.com>

* More stuff and refactors per suggestion

* More bits

Signed-off-by: liach <liach@users.noreply.github.com>

* Missed the one i need to map

Signed-off-by: liach <liach@users.noreply.github.com>

* You like dual better

Signed-off-by: liach <liach@users.noreply.github.com>

* Update mappings/net/minecraft/client/texture/SpriteAtlasTexture.mapping

* 😓

Signed-off-by: liach <liach@users.noreply.github.com>

* Some pre2 stuff as well
2019-11-25 20:12:08 +00:00
liach 14997e8ae6 Map biome color cache stuff and matrixstack pop (#945) 2019-11-09 19:08:42 +00:00
modmuss50 3bf4ded164 19w45a 2019-11-07 19:37:31 +00:00
Runemoro 630bd1451b Refactor rendering (#930)
* 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
2019-11-07 18:03:04 +00:00
modmuss50 bf6fdd7195 19w44a 2019-10-30 16:28:24 +00:00
liach 6fa1e34c83 19w42a rendering and layers etc (#917)
* 19w42a rendering and layers etc

Signed-off-by: liach <liach@users.noreply.github.com>

* Stage changes

Signed-off-by: liach <liach@users.noreply.github.com>

* stuff stuff stuff

Signed-off-by: liach <liach@users.noreply.github.com>

* fixed color

Signed-off-by: liach <liach@users.noreply.github.com>

* Banner Pattern "Patterns"

Patterns name see https://minecraft.gamepedia.com/Banner#Block_entity

* Some more changes

Signed-off-by: liach <liach@users.noreply.github.com>

* Add 2 mappings

Signed-off-by: liach <liach@users.noreply.github.com>
2019-10-30 16:15:03 +00:00
modmuss50 841e352c61 19w41a 2019-10-09 18:17:26 +01:00
Runemoro 04ad11fed6 Rendering mappings (#897)
* Rendering mappings

* Remove duplicate class

* Suggestions by liach and juuxel

* Unmap inferred field and move to better package
2019-10-09 17:43:46 +01:00
Danielshe 255b94fe0d 19w39a: Some simple methods (#884) 2019-09-29 18:41:14 +01:00
modmuss50 052e77acc0 19w39a 2019-09-27 17:23:24 +01:00
modmuss50 bf500b5591 Fix 19w38b 2019-09-18 17:39:49 +01:00
modmuss50 2565f0b45b 19w38a 2019-09-18 16:17:05 +01:00
modmuss50 b198b9c6ca Merge #822
# Conflicts:
#	mappings/net/minecraft/entity/LivingEntity.mapping
#	mappings/net/minecraft/entity/mob/MobEntity.mapping
#	mappings/net/minecraft/util/SystemUtil.mapping
2019-09-12 14:28:23 +01:00
­Sollace 7166083ec4 LivingEntity mappings (#802)
* field_6276 -> lastDamageSource
field_6226 -> lastDamageTime

* getHealthMaximum -> getMaximumHealth

* method_6124 -> getPrimeAdversary

* addPotionEffect -> addStatusEffect

* method_6009 -> onStatusEffectUpgraded
method_6020 -> onStatusEffectApplied

* clearPotionEffects -> clearStatusEffects

* method_6024 -> getLeaningPitch
field_6243 -> leaningPitch
field_6264 -> lastLeaningPitch

* Mapped all the tracking fields. (These are sent by the server and incrementally applied on the client to rubber-band entities into position)

* method_18802 -> getMovementSpeed
field_6281 -> flyingSpeed

* method_18801 -> applyClimbingSpeed

* method_6093 -> knockDownwards

* cannotMove -> isImmobile

* method_18396 -> getArmorVisibility

* isEquippedStackValid -> hasStackEquipped

* setEquippedStack -> equipStack

* attributeContainer -> attributes

* method_6039 -> isBlocking
method_6061 -> canPierceDefense

* method_6040 -> consumeItem

* method_6076 -> tickActiveItemStack

* method_6072 -> updateLeaningPitch

* method_6077 -> canEnterTrapdoor

* method_16212 -> getBlockStateUnderFeet (suggestions welcome)

* method_6095 -> absorbDamage

* field_6271 -> knockbackVelocity (or painFactor)

* field_6239 -> roll

* field_6228 -> jumpingCooldown

* field_6254 -> maxHurtTime

* method_6129 -> onStatusEffectRemoved

* field_6285 -> effectsChanged

* spawnPotionParticles -> tickStatusEffects

* method_6031 -> turnHead (as hinted by Mojang)
field_6283 -> bodyYaw
field_6220 -> prevBodyYaw

* field_6255 -> lookDirection (result of turnHead)

* method_6038 -> onDismounted (checks collisions and pushes the entity and boat apart)

* field_6267 -> diagonalSpeed

* field_6261 -> pushCooldown
method_6035 -> push (As hinted by Mojang)
tickPushing -> tickCramming (applies the cramming rule)

* field_6232 -> scoreAmount (appears unused. Value increments a score on the player when this entity is killed - see ServerPlayerEntity.updateKilledAdvancementCriterion)

* field_6253 -> lastDamageTaken (Damage amount is stored and applyDamage is called with the difference only if the new damage is higher than it was before)

* field_6275 -> prevLookDirection

* field_6269 -> defaultMaximumHealth (public, final, value is 20)

* (unused - interpolated between 0 and 0.3 when the entity is on the ground, and always 0 when riding)
field_6233 -> stepBobbingAmount
field_6217 -> prevStepBobbingAmount

* (unused - set to a random float when constructing)
field_6244 -> randomLargeSeed
field_6262 -> randomSmallSeed

* Stitch did this. I don't know why.

* StatusEffect.method_5555 -> onApplied

* canPierceDefense -> tryUseShield

* absorbDamage -> tryUseTotem

* getBlockStateUnderFeet -> getBlockState

* diagonalSpeed -> turningSpeed

* Mapped several parameters

* removeStatusEffect -> tryRemoveStatusEffect
removePotionEffect -> removeStatusEffect

* isPotionEffective -> canHaveStatusEffect

* More parameters

* tryUseShield -> blockedByShield (because "hitsShield" reads like manglish)
2019-08-22 21:25:19 +01:00
modmuss50 5695254f64 19w34a 2019-08-22 14:39:40 +01:00
Shnupbups 4243e9813b Mapped lots of random things (#794)
* 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
2019-07-31 15:20:12 +01:00
Runemoro 618083791c Fix some methods not using intermediaries (#788) 2019-07-08 18:09:22 +02:00
modmuss50 e20cfe9b0e 1.14.4-pre3 2019-07-08 13:27:46 +01:00
modmuss50 618de57dfb 1.14.4-pre2 2019-07-04 16:29:01 +01:00
Adrian Siekierka ab32dae2fa 1.14.4-pre1 2019-07-03 20:50:19 +02:00
Adrian Siekierka 1a6f261a2e The Great Intermediary Update, Part 1 2019-06-28 23:55:20 +02:00
modmuss50 b6ed693b8d 1.14.3-pre4 2019-06-19 20:24:08 +01: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
Runemoro 99548e84ad Chunk rendering mappings (#677)
* Chunk rendering mappings

* Update WorldRenderer.mapping

* Fix

* Update WorldRenderer.mapping
2019-05-06 17:56:16 +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
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 66156a5471 update to 19w08a 2019-02-20 21:49:23 +01:00
Adrian Siekierka 93e1c4a918
GUI mappings, take two (#469) 2019-02-18 22:02:56 +01:00
Adrian Siekierka 4f390a9306
map 19w07a resource reloading (#462) 2019-02-14 20:54:51 +01:00
modmuss50 8a2af8044e 19w07a 2019-02-13 17:35:08 +00:00
Runemoro cb61641543 World mappings 2019-02-10 02:49:48 -05:00
Adrian Siekierka e2a1bba0b6 19w06a 2019-02-06 21:22:24 +01:00
Siphalor 60b0d0a61f Added mappings for Dimension (#439) 2019-02-05 19:05:28 +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
modmuss50 347fd572c2 19w03a 2019-01-16 18:24:40 +00:00
Runemoro 37756970dc A few rendering mappings (#401)
* A few rendering mappings

* Fix something

* Fix something
2019-01-16 15:48:01 +00:00
Adrian Siekierka 1fa0cf6387 block/chunk render things (#398) 2019-01-13 22:10:29 +00:00
Adrian Siekierka bf62f29ddf update to 19w02a 2019-01-09 18:20:38 +01:00
Runemoro 9e8dc23783 Lots of mappings (#381) 2019-01-09 17:05:18 +01:00
Kitten 8b85ab76c2 draw -> build (#376) 2019-01-01 17:52:29 +01:00
Kitten a2494979cb Fix draw methods being back-to-front (#375) 2019-01-01 16:25:19 +01:00
Adrian Siekierka a2c2c754e9 autofixes 2018-12-22 19:26:44 +01:00
Erlend Åmdal 60a2f5b80e LightmapTextureManager and various ambient light things (#312)
* Map LightmapTextureManager and various ambient light things
2018-12-20 20:51:03 +01:00
Kitten 45b34f895b Fix (World)Renderer class naming (#346) 2018-12-20 17:38:09 +01:00
Adrian Siekierka c8152014af rebuild method names 2018-12-12 18:22:18 +01:00
Adrian Siekierka e9ccf701a7 port to 18w50a 2018-12-12 18:12:26 +01:00
Adrian Siekierka c79869974f
fix ParticleManager, map LookupManager and related (#254) 2018-12-10 18:33:47 +01:00
Adrian Siekierka 245ce1dd92 update to 18w49a 2018-12-05 15:13:16 +01:00
kashike 3a95f539e7 some things (#220) 2018-11-30 12:38:47 +01:00
Adrian Siekierka 50764e1853 update to 18w48a 2018-11-29 21:10:38 +01:00
Jamie Mansfield dab4cc0f7a Improve renderer mappings (#215)
* Improve renderer mappings

*Dispatcher, DefaultEntityRenderer:
- See https://notch.tumblr.com/post/581187056/evolution-of-the-entityrenderdispatcher

Cube, Polygon:
- See the very old (RubyDung) versions pre-obfuscation
- Cube is used in the Bedrock entity model JSONs, see https://minecraft.gamepedia.com/Tutorials/Changing_Minecraft_entity_models

* Correct Polygon mapping

* Cube -> Cuboid; CubeBox -> Box

* Remaining minor things

* EntityModel -> Model

* ChunkRenderDispatcher

* Fix Polygon package
2018-11-29 21:07:08 +01:00
Adrian Siekierka 13ed3f8e2c update to 18w47b 2018-11-27 19:50:51 +01:00
Adrian Siekierka 591e770b72 update to 18w47a 2018-11-21 17:58:05 +01:00
Adrian Siekierka 1418bb1b37 update to 18w46a 2018-11-15 18:05:03 +01:00
Adrian Siekierka 47d8c24214 update to 18w45a 2018-11-07 17:37:58 +01:00
Adrian Siekierka 5fd73b1943 update Enigma to 0.12.1 2018-11-04 13:22:38 +01:00
asie ce1ae229d1 client-side interaction-related mapping 2018-11-03 19:06:46 +01:00
asie 1ec80e3ecc first shot at mapping font-related stuff 2018-10-31 22:01:41 +01:00
Adrian Siekierka d7fc5168c5 18w44a 2018-10-31 17:57:50 +01:00
asie 1b13674f8a map DyeColor, JsonLikeTagParser, update 2018-10-27 09:11:38 +02:00
Adrian Siekierka 45e6a3755d update to 18w43c 2018-10-26 13:08:59 +02:00
Adrian Siekierka 9cd29783ca 18w43b initial migration, 99% likely to not work 2018-10-24 21:40:05 +02:00
Player 76cdc3f14e Include server-only mapping, some fixup from matcher bugs. 2017-06-12 21:56:35 +02:00
Player da4b189aef Update to 1.12 (preliminary!) 2017-06-08 16:01:49 +02:00
mezz 781eb35cc9 Render tick calculations and some advancement mappings (#164) 2017-05-27 10:31:02 +02:00
Adrian Siekierka cd0a6cf43d fix missing constructor names from 16w38a 2017-05-13 15:37:15 +02:00
Adrian Siekierka 95e2db6744 restore old argnames from 16w38a 2017-05-13 08:02:51 +02:00
modmuss50 dcd65835c8
Rebuild method names, with enigma fix. 2017-04-05 19:11:28 +01:00
modmuss50 013cae4ada
Revert "Rebuild method names"
This reverts commit a7ecff3f2e.
2017-04-05 13:36:44 +01:00
modmuss50 a7ecff3f2e
Rebuild method names 2017-04-05 13:32:34 +01:00
modmuss50 410400d99e
17w13b 2017-04-05 12:31:24 +01:00