package com.five35.minecraft.deathbox.client;

import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;

public class DeathBoxModel extends ModelBase {
	private final ModelRenderer renderer;

	public DeathBoxModel() {
		this.renderer = new ModelRenderer(this);
		this.renderer.addBox(-4, -4, -4, 8, 8, 8);
	}

	@Override
	public void render(final Entity entity, final float x, final float y, final float z, final float yaw, final float pitch, final float scale) {
		this.setRotationAngles(x, y, z, yaw, pitch, scale, entity);
		this.renderer.render(scale);
	}

	@Override
	public void setRotationAngles(final float x, final float y, final float z, final float yaw, final float pitch, final float scale, final Entity entity) {
		this.renderer.rotateAngleX = (float) (pitch * Math.PI / 180);
		this.renderer.rotateAngleY = (float) (yaw * Math.PI / 180);
	}
}

@@ -247,24 +247,54 @@
 enderer 
-r
+head;%0A%09private final ModelR
 enderer
+ hat
 ;%0A%0A%09publ
@@ -321,24 +321,20 @@
 %0A%09%09this.
-renderer
+head
  = new M
@@ -360,24 +360,106 @@
 %0A%09%09this.
-renderer
+head.addBox(-4, -4, -4, 8, 8, 8);%0A%0A%09%09this.hat = new ModelRenderer(this, 32, 0);%0A%09%09this.hat
 .addBox(
@@ -477,16 +477,23 @@
  8, 8, 8
+, 0.25f
 );%0A%09%7D%0A%0A%09
@@ -714,24 +714,46 @@
 %0A%09%09this.
+head.
 render
-er
+(scale);%0A%09%09this.hat
 .render(
@@ -932,32 +932,28 @@
 y) %7B%0A%09%09this.
-renderer
+head
 .rotateAngle
@@ -1000,16 +1000,12 @@
 his.
-renderer
+head
 .rot
@@ -1046,14 +1046,115 @@
  / 180);
+%0A%0A%09%09this.hat.rotateAngleX = this.head.rotateAngleX;%0A%09%09this.hat.rotateAngleY = this.head.rotateAngleY;
 %0A%09%7D%0A%7D%0A

add hat layer