Various tweaks to boulder

This commit is contained in:
Electroblob77
2020-07-05 15:46:49 +01:00
parent 22a125d720
commit de7226f792
2 changed files with 45 additions and 9 deletions
@@ -23,16 +23,19 @@ public class RenderBoulder extends Render<EntityBoulder> {
public void doRender(EntityBoulder entity, double x, double y, double z, float yaw, float partialTicks){
GlStateManager.pushMatrix();
GlStateManager.translate(x, y + 1.2, z);
GlStateManager.translate(x, y + entity.height/2, z);
GlStateManager.rotate(180, 0F, 0F, 1F);
GlStateManager.rotate(yaw - 90, 0, 1, 0);
GlStateManager.rotate(entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * partialTicks, 0, 0, 1);
GlStateManager.translate(0, entity.height/2 - 1.5, 0);
GlStateManager.translate(0, -entity.height/2, 0);
// Pass in -1 for the lifetime as the boulder crumbles when the time expires
float s = DrawingUtils.smoothScaleFactor(-1, entity.ticksExisted, partialTicks, 10, 10);
s *= entity.getSizeMultiplier();
GlStateManager.scale(s, s, s);
GlStateManager.translate(0, 0.875, 0); // No idea why it starts 7/8 of a block too low, but it does
this.bindTexture(TEXTURE);
model.render(entity, 0, 0, 0, 0, 0, 0.0625f);