Remove debug code and add deadmous5 ears

This commit is contained in:
Sollace 2018-08-18 17:35:18 +02:00
parent 57902a7e62
commit c95d540923
3 changed files with 46 additions and 8 deletions

View file

@ -8,16 +8,11 @@ public class ModelDeadMau5Ears extends ModelSkeletonHead {
public ModelDeadMau5Ears() {
super();
skeletonHead = new ModelRenderer(this, 24, 0);
skeletonHead.addBox(-3, -6, -1, 6, 6, 1, 0);
skeletonHead.addBox(-9, -13, -1, 6, 6, 1, 0);
skeletonHead.addBox(3, -13, -1, 6, 6, 1, 0);
}
public void setVisible(boolean show) {
this.boxList.clear();
skeletonHead = new ModelRenderer(this, 24, 0);
skeletonHead.addBox(-9, -13, -1, 6, 6, 1, 0);
skeletonHead.addBox(3, -13, -1, 6, 6, 1, 0);
skeletonHead.isHidden = !show;
}
}

View file

@ -0,0 +1,41 @@
package com.minelittlepony.render.layer;
import net.minecraft.client.entity.AbstractClientPlayer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.entity.RenderLivingBase;
import com.minelittlepony.model.BodyPart;
import com.minelittlepony.model.components.ModelDeadMau5Ears;
public class LayerDJPon3Head extends AbstractPonyLayer<AbstractClientPlayer> {
private final ModelDeadMau5Ears deadMau5 = new ModelDeadMau5Ears();
public LayerDJPon3Head(RenderLivingBase<AbstractClientPlayer> entity) {
super(entity);
}
@Override
protected void doPonyRender(AbstractClientPlayer entity, float move, float swing, float partialTicks, float ticks, float headYaw, float headPitch, float scale) {
if ("deadmau5".equals(entity.getName())) {
getRenderer().bindTexture(entity.getLocationSkin());
GlStateManager.pushMatrix();
getPlayerModel().transform(BodyPart.HEAD);
getPlayerModel().bipedHead.postRender(scale);
GlStateManager.scale(1.3333334F, 1.3333334F, 1.3333334F);
GlStateManager.translate(0, 0.3F, 0);
deadMau5.setVisible(true);
deadMau5.render(entity, move, swing, partialTicks, 0, 0, scale);
GlStateManager.popMatrix();
}
}
@Override
public boolean shouldCombineTextures() {
return true;
}
}

View file

@ -10,6 +10,7 @@ import com.minelittlepony.pony.data.PonyLevel;
import com.minelittlepony.render.PonySkull;
import com.minelittlepony.render.PonySkullRenderer.ISkull;
import com.minelittlepony.render.RenderPony;
import com.minelittlepony.render.layer.LayerDJPon3Head;
import com.minelittlepony.render.layer.LayerEntityOnPonyShoulder;
import com.minelittlepony.render.layer.LayerHeldPonyItemMagical;
import com.minelittlepony.render.layer.LayerPonyArmor;
@ -94,6 +95,7 @@ public class RenderPonyPlayer extends RenderPlayer implements IRenderPony<Abstra
protected void addLayers() {
layerRenderers.clear();
addLayer(new LayerDJPon3Head(this));
addLayer(new LayerPonyArmor<>(this));
addLayer(new LayerArrow(this));
addLayer(new LayerPonyCustomHead<>(this));
@ -164,7 +166,7 @@ public class RenderPonyPlayer extends RenderPlayer implements IRenderPony<Abstra
}
GlStateManager.popMatrix();
}
}
@Override
protected void applyRotations(AbstractClientPlayer player, float yaw, float pitch, float ticks) {