From 479252d9de4b94bb790f69afc32ddfe17602e8a9 Mon Sep 17 00:00:00 2001 From: peytonplayz585 <106421860+PeytonPlayz595@users.noreply.github.com> Date: Thu, 27 Jul 2023 00:21:52 -0700 Subject: [PATCH] Made the world actually load! --- resources/char.png | Bin 0 -> 1029 bytes .../net/PeytonPlayz585/MinecraftMain.java | 8 +- .../java/net/minecraft/client/Minecraft.java | 3 + .../minecraft/client/render/RenderEngine.java | 2 +- .../client/render/entity/Render.java | 2 +- .../client/render/entity/RenderLiving.java | 143 +++++++++--------- 6 files changed, 75 insertions(+), 83 deletions(-) create mode 100644 resources/char.png diff --git a/resources/char.png b/resources/char.png new file mode 100644 index 0000000000000000000000000000000000000000..61d4b1ca542b828ec2684716001ce432a4256a67 GIT binary patch literal 1029 zcmV+g1p51lP))9>MmnW1C~^RQe*mbcYCtdmU|=R13NIfIBp3)N8ww^NTR%TPYinx&TU!9k%!gGw zIx&fsZ(AcHBPb{+R!PhNo}PwNG%OwtDI5%eQ#nyFB`Y2c9}o*D8Vx2G3oRWECmRcz zV?-?=5O+c~oM%WgBoQ(r5Mo0wD;^Fe8VsFkPb?l0idj1&7YQgE3xrZJqH0HUNH2O$ zGb9)ahgdp;RXdzxMTlBCC>#qqC=@Ru5u9mE|NsBHiE>gsiL``mQYa>xWJ;fCNsnGW zFCYzoQ#3Rs60CMwZ9^(QDiv=l?dt$wga=nXkwux+< za$LTMY{r&=y^eIZf^t*qF`fVb00DGTPE!Ct=GbNc00L=AL_t(Y$EA~pmYXmTMJ-cg z5D{Pp8=P>5zAcUcTjJ}ZYw@huhow~F3-=;;+7jX>#oej1Y2-dHxG_ZuP?4X zUtV3Pr$+~yt8h`~Vgf+DvA(SzzyI>bvVQKoIM%n<8+A5Bk&FBpxXtCYc2s=#;W6l0 zT8!Fj%S|_yxyS`XQ9J7D8@q2`r|I6|;ok1X)9#aQ8~%_i7sY6zEIa}|1j+NN$WrxQ zU-CMsR*AJ>E#w14oW}rF(7XTwerv8Ri~$UzY?MH-u+=wB(?emplcr$^wHXpZFeXIQ zn6DUg3n&i(N~WfngoNP77;25MrvU(^i3twb{SkmM1mF*15+ZOytzjX;!I(qu26&q0 z!Tk`yLDUEnBmmIV9UVa7gEY_c5Mnljp!B#K&UIa{sh}DZY#j#peu>S30l=dn@lpgZ z4f7Ks0D-FNwf_MIXTSi^0O0_b0doVSCIA5k1i=8nFvh-u1ekn?{{ZaG3{V^HKmv?g z0Ol@? 0) { - var3 = ((float)var1.deathTime + var6 - 1.0F) / 20.0F * 1.6F; - var3 = MathHelper.sqrt_float(var3); - if(var3 > 1.0F) { - var3 = 1.0F; - } - - GL11.glRotatef(var3 * this.getDeathMaxRotation(var1), 0.0F, 0.0F, 1.0F); - } - - GL11.glScalef(-(1.0F / 16.0F), -(1.0F / 16.0F), 1.0F / 16.0F); - this.preRenderCallback(var1, var6); - GL11.glTranslatef(0.0F, -24.0F, 0.0F); - GL11.glEnable(GL11.GL_NORMALIZE); - var3 = var1.prevLimbYaw + (var1.limbYaw - var1.prevLimbYaw) * var6; - var4 = var1.limbSwing - var1.limbYaw * (1.0F - var6); + var5 = var1.prevRenderYawOffset + (var1.renderYawOffset - var1.prevRenderYawOffset) * var6; + float var7 = var1.prevRotationYaw + (var1.rotationYaw - var1.prevRotationYaw) * var6; + float var8 = var1.prevRotationPitch + (var1.rotationPitch - var1.prevRotationPitch) * var6; + GL11.glTranslatef(var2, var3, var4); + var2 = (float)var1.ticksExisted + var6; + GL11.glRotatef(180.0F - var5, 0.0F, 1.0F, 0.0F); + if(var1.deathTime > 0) { + var3 = ((float)var1.deathTime + var6 - 1.0F) / 20.0F * 1.6F; + var3 = MathHelper.sqrt_float(var3); if(var3 > 1.0F) { var3 = 1.0F; } - this.loadDownloadableImageTexture(var1.skinUrl, var1.getTexture()); - GL11.glEnable(GL11.GL_ALPHA_TEST); - this.mainModel.render(var4, var3, var2, var7 - var5, var8, 1.0F); + GL11.glRotatef(var3 * this.getDeathMaxRotation(var1), 0.0F, 0.0F, 1.0F); + } - for(int var9 = 0; var9 < 4; ++var9) { - if(this.shouldRenderPass(var1, var9)) { - this.renderPassModel.render(var4, var3, var2, var7 - var5, var8, 1.0F); - GL11.glDisable(GL11.GL_BLEND); - GL11.glEnable(GL11.GL_ALPHA_TEST); - } - } + GL11.glScalef(-(1.0F / 16.0F), -(1.0F / 16.0F), 1.0F / 16.0F); + this.preRenderCallback(var1, var6); + GL11.glTranslatef(0.0F, -24.0F, 0.0F); + GL11.glEnable(GL11.GL_NORMALIZE); + var3 = var1.prevLimbYaw + (var1.limbYaw - var1.prevLimbYaw) * var6; + var4 = var1.limbSwing - var1.limbYaw * (1.0F - var6); + if(var3 > 1.0F) { + var3 = 1.0F; + } - float var15 = var1.getEntityBrightness(var6); - int var14 = this.getColorMultiplier(var1, var15, var6); - if(var14 >>> 24 > 0 || var1.hurtTime > 0 || var1.deathTime > 0) { - GL11.glDisable(GL11.GL_TEXTURE_2D); - GL11.glDisable(GL11.GL_ALPHA_TEST); - GL11.glEnable(GL11.GL_BLEND); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - GL11.glDepthFunc(GL11.GL_EQUAL); - if(var1.hurtTime > 0 || var1.deathTime > 0) { - GL11.glColor4f(var15, 0.0F, 0.0F, 0.4F); - this.mainModel.render(var4, var3, var2, var7 - var5, var8, 1.0F); + this.loadDownloadableImageTexture(var1.skinUrl, var1.getTexture()); + GL11.glEnable(GL11.GL_ALPHA_TEST); + this.mainModel.render(var4, var3, var2, var7 - var5, var8, 1.0F); - for(int var10 = 0; var10 < 4; ++var10) { - if(this.shouldRenderPass(var1, var10)) { - GL11.glColor4f(var15, 0.0F, 0.0F, 0.4F); - this.renderPassModel.render(var4, var3, var2, var7 - var5, var8, 1.0F); - } - } - } - - if(var14 >>> 24 > 0) { - float var16 = (float)(var14 >> 16 & 255) / 255.0F; - var15 = (float)(var14 >> 8 & 255) / 255.0F; - float var11 = (float)(var14 & 255) / 255.0F; - var6 = (float)(var14 >>> 24) / 255.0F; - GL11.glColor4f(var16, var15, var11, var6); - this.mainModel.render(var4, var3, var2, var7 - var5, var8, 1.0F); - - for(int var12 = 0; var12 < 4; ++var12) { - if(this.shouldRenderPass(var1, var12)) { - GL11.glColor4f(var16, var15, var11, var6); - this.renderPassModel.render(var4, var3, var2, var7 - var5, var8, 1.0F); - } - } - } - - GL11.glDepthFunc(GL11.GL_LEQUAL); + for(int var9 = 0; var9 < 4; ++var9) { + if(this.shouldRenderPass(var1, var9)) { + this.renderPassModel.render(var4, var3, var2, var7 - var5, var8, 1.0F); GL11.glDisable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_ALPHA_TEST); - GL11.glEnable(GL11.GL_TEXTURE_2D); + } + } + + float var15 = var1.getEntityBrightness(var6); + int var14 = this.getColorMultiplier(var1, var15, var6); + if(var14 >>> 24 > 0 || var1.hurtTime > 0 || var1.deathTime > 0) { + GL11.glDisable(GL11.GL_TEXTURE_2D); + GL11.glDisable(GL11.GL_ALPHA_TEST); + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + GL11.glDepthFunc(GL11.GL_EQUAL); + if(var1.hurtTime > 0 || var1.deathTime > 0) { + GL11.glColor4f(var15, 0.0F, 0.0F, 0.4F); + this.mainModel.render(var4, var3, var2, var7 - var5, var8, 1.0F); + + for(int var10 = 0; var10 < 4; ++var10) { + if(this.shouldRenderPass(var1, var10)) { + GL11.glColor4f(var15, 0.0F, 0.0F, 0.4F); + this.renderPassModel.render(var4, var3, var2, var7 - var5, var8, 1.0F); + } + } } - GL11.glDisable(GL11.GL_NORMALIZE); - } catch (Exception var13) { - var13.printStackTrace(); + if(var14 >>> 24 > 0) { + float var16 = (float)(var14 >> 16 & 255) / 255.0F; + var15 = (float)(var14 >> 8 & 255) / 255.0F; + float var11 = (float)(var14 & 255) / 255.0F; + var6 = (float)(var14 >>> 24) / 255.0F; + GL11.glColor4f(var16, var15, var11, var6); + this.mainModel.render(var4, var3, var2, var7 - var5, var8, 1.0F); + + for(int var12 = 0; var12 < 4; ++var12) { + if(this.shouldRenderPass(var1, var12)) { + GL11.glColor4f(var16, var15, var11, var6); + this.renderPassModel.render(var4, var3, var2, var7 - var5, var8, 1.0F); + } + } + } + + GL11.glDepthFunc(GL11.GL_LEQUAL); + GL11.glDisable(GL11.GL_BLEND); + GL11.glEnable(GL11.GL_ALPHA_TEST); + GL11.glEnable(GL11.GL_TEXTURE_2D); } + GL11.glDisable(GL11.GL_NORMALIZE); + GL11.glEnable(GL11.GL_CULL_FACE); GL11.glPopMatrix(); }