More rendering shenanigans

This commit is contained in:
Sollace 2018-07-28 13:27:49 +02:00
parent e2b6075fb6
commit 65c8220d7a
3 changed files with 8 additions and 3 deletions

View file

@ -486,11 +486,9 @@ public class GuiSkins extends GameGui {
rotate(((updateCounter + partialTick) * 2.5F) % 360, 0, 1, 0); rotate(((updateCounter + partialTick) * 2.5F) % 360, 0, 1, 0);
thePlayer.rotationYawHead = (float)Math.atan(mouseX / 20) * -30; thePlayer.rotationYawHead = (float)Math.atan(mouseX / 20) * 30;
thePlayer.rotationPitch = (float)Math.atan(mouseY / 40) * -20; thePlayer.rotationPitch = (float)Math.atan(mouseY / 40) * -20;
translate(0, thePlayer.getYOffset(), 0);
mc.getRenderManager().renderEntity(thePlayer, 0, 0, 0, 0, 1, false); mc.getRenderManager().renderEntity(thePlayer, 0, 0, 0, 0, 1, false);
popMatrix(); popMatrix();

View file

@ -104,16 +104,22 @@ public class RenderPlayerModel<M extends EntityPlayerModel> extends RenderLiving
player.leftArmPose = ArmPose.EMPTY; player.leftArmPose = ArmPose.EMPTY;
player.rightArmPose = ArmPose.EMPTY; player.rightArmPose = ArmPose.EMPTY;
double offset = entity.getYOffset() + 0.01;
pushMatrix();
enableBlend(); enableBlend();
color(1, 1, 1, 0.3F); color(1, 1, 1, 0.3F);
translate(0, offset, 0);
super.doRender(entity, x, y, z, entityYaw, partialTicks); super.doRender(entity, x, y, z, entityYaw, partialTicks);
color(1, 1, 1, 1); color(1, 1, 1, 1);
disableBlend(); disableBlend();
popMatrix();
pushMatrix(); pushMatrix();
scale(1, -1, 1); scale(1, -1, 1);
translate(0, offset, 0);
super.doRender(entity, x, y, z, entityYaw, partialTicks); super.doRender(entity, x, y, z, entityYaw, partialTicks);
popMatrix(); popMatrix();

View file

@ -53,6 +53,7 @@ public class RenderPonyModel extends RenderPlayerModel<EntityPonyModel> implemen
if (renderingAsHuman) { if (renderingAsHuman) {
super.preRenderCallback(entity, ticks); super.preRenderCallback(entity, ticks);
} else { } else {
//GlStateManager.scale(1.1, 1.1, 1.1);
renderPony.preRenderCallback(entity, ticks); renderPony.preRenderCallback(entity, ticks);
GlStateManager.translate(0, 0, -entity.width / 2); // move us to the center of the shadow GlStateManager.translate(0, 0, -entity.width / 2); // move us to the center of the shadow