use of net.minecraft.client.model.ModelBiped in project Wizardry by TeamWizardry.
the class ClientProxy method init.
@Override
public void init(FMLInitializationEvent event) {
super.init(event);
MinecraftForge.EVENT_BUS.register(CapeHandler.instance());
Minecraft.getMinecraft().getRenderManager().getSkinMap().values().forEach(render -> render.addLayer(new BloodRenderLayer(render)));
Map<String, RenderPlayer> skinMap = Minecraft.getMinecraft().getRenderManager().getSkinMap();
RenderPlayer render = skinMap.get("default");
render.addLayer(new RenderHaloPlayer(render.getMainModel().bipedHead));
render = skinMap.get("slim");
render.addLayer(new RenderHaloPlayer(render.getMainModel().bipedHead));
Map<Class<? extends Entity>, Render<? extends Entity>> map = Minecraft.getMinecraft().getRenderManager().entityRenderMap;
for (ResourceLocation entity : EntityList.getEntityNameList()) {
Class<? extends Entity> clazz = EntityList.getClass(entity);
Render<? extends Entity> entityRenderer = map.get(clazz);
if (entityRenderer instanceof RenderLiving<?>) {
ModelBase main = ((RenderLiving<?>) entityRenderer).getMainModel();
ModelRenderer renderer = null;
if (main instanceof ModelBiped)
renderer = ((ModelBiped) main).bipedHead;
((RenderLiving<?>) entityRenderer).addLayer(new RenderHaloEntity(renderer));
}
}
}
use of net.minecraft.client.model.ModelBiped in project Tropicraft by Tropicraft.
the class ItemScubaGear method getArmorModel.
/**
* Override this method to have an item handle its own armor rendering.
*
* @param entityLiving The entity wearing the armor
* @param itemStack The itemStack to render the model of
* @param armorSlot The slot the armor is in
* @param _default Original armor model. Will have attributes set.
* @return A ModelBiped to render instead of the default
*/
@Override
@SideOnly(Side.CLIENT)
public net.minecraft.client.model.ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemstack, EntityEquipmentSlot armorSlot, net.minecraft.client.model.ModelBiped _default) {
if (itemstack.isEmpty()) {
return null;
}
ModelBiped armorModel = EntityRenderRegistry.getScubaModel(armorSlot);
if (armorModel != null) {
armorModel.isSneak = entityLiving.isSneaking();
armorModel.isRiding = entityLiving.isRiding();
armorModel.isChild = entityLiving.isChild();
armorModel.rightArmPose = entityLiving.getHeldItemMainhand() != null ? ModelBiped.ArmPose.BLOCK : ModelBiped.ArmPose.EMPTY;
return armorModel;
}
return null;
}
use of net.minecraft.client.model.ModelBiped in project Minestuck by mraof.
the class ClientProxy method preInit.
@Override
public void preInit() {
RenderingRegistry.registerEntityRenderingHandler(EntityNakagator.class, RenderEntityMinestuck.getFactory(new ModelNakagator(), 0.5F));
RenderingRegistry.registerEntityRenderingHandler(EntitySalamander.class, RenderEntityMinestuck.getFactory(new ModelSalamander(), 0.5F));
RenderingRegistry.registerEntityRenderingHandler(EntityIguana.class, RenderEntityMinestuck.getFactory(new ModelIguana(), 0.5F));
RenderingRegistry.registerEntityRenderingHandler(EntityTurtle.class, RenderEntityMinestuck.getFactory(new ModelTurtle(), 0.5F));
RenderingRegistry.registerEntityRenderingHandler(EntityImp.class, RenderEntityMinestuck.getFactory(new ModelImp(), 0.5F));
RenderingRegistry.registerEntityRenderingHandler(EntityOgre.class, RenderEntityMinestuck.getFactory(new ModelOgre(), 2.8F));
RenderingRegistry.registerEntityRenderingHandler(EntityBasilisk.class, RenderEntityMinestuck.getFactory(new ModelBasilisk(), 2.8F));
RenderingRegistry.registerEntityRenderingHandler(EntityLich.class, RenderEntityMinestuck.getFactory(new ModelLich(), 0.5F));
RenderingRegistry.registerEntityRenderingHandler(EntityGiclops.class, RenderEntityMinestuck.getFactory(new ModelGiclops(), 7.6F));
RenderingRegistry.registerEntityRenderingHandler(EntityBishop.class, RenderEntityMinestuck.getFactory(new ModelBishop(), 1.8F));
RenderingRegistry.registerEntityRenderingHandler(EntityRook.class, RenderEntityMinestuck.getFactory(new ModelRook(), 2.5F));
RenderingRegistry.registerEntityRenderingHandler(EntityUnderlingPart.class, new IRenderFactory<EntityUnderlingPart>() {
@Override
public Render<EntityUnderlingPart> createRenderFor(RenderManager manager) {
return new RenderShadow(manager, 2.8F);
}
});
RenderingRegistry.registerEntityRenderingHandler(EntityBigPart.class, new IRenderFactory<EntityBigPart>() {
@Override
public Render<EntityBigPart> createRenderFor(RenderManager manager) {
return new RenderShadow(manager, 0F);
}
});
RenderingRegistry.registerEntityRenderingHandler(EntityPawn.class, new IRenderFactory<EntityPawn>() {
@Override
public Render<EntityPawn> createRenderFor(RenderManager manager) {
return new RenderPawn(manager, new ModelBiped(), 0.5F);
}
});
RenderingRegistry.registerEntityRenderingHandler(EntityGrist.class, new IRenderFactory<EntityGrist>() {
@Override
public Render<EntityGrist> createRenderFor(RenderManager manager) {
return new RenderGrist(manager);
}
});
RenderingRegistry.registerEntityRenderingHandler(EntityVitalityGel.class, new IRenderFactory<EntityVitalityGel>() {
@Override
public Render<EntityVitalityGel> createRenderFor(RenderManager manager) {
return new RenderVitalityGel(manager);
}
});
RenderingRegistry.registerEntityRenderingHandler(EntityDecoy.class, new IRenderFactory<EntityDecoy>() {
@Override
public Render<EntityDecoy> createRenderFor(RenderManager manager) {
return new RenderDecoy(manager);
}
});
RenderingRegistry.registerEntityRenderingHandler(EntityMetalBoat.class, new IRenderFactory<EntityBoat>() {
@Override
public Render<EntityBoat> createRenderFor(RenderManager manager) {
return new RenderMetalBoat(manager);
}
});
RenderingRegistry.registerEntityRenderingHandler(EntityCrewPoster.class, new IRenderFactory<EntityCrewPoster>() {
@Override
public Render<EntityCrewPoster> createRenderFor(RenderManager manager) {
return new RenderHangingArt<>(manager, "midnight_poster");
}
});
RenderingRegistry.registerEntityRenderingHandler(EntitySbahjPoster.class, new IRenderFactory<EntitySbahjPoster>() {
@Override
public Render<EntitySbahjPoster> createRenderFor(RenderManager manager) {
return new RenderHangingArt<>(manager, "sbahj_poster");
}
});
MinecraftForge.EVENT_BUS.register(new MinestuckKeyHandler());
MinecraftForge.EVENT_BUS.register(new ClientEventHandler());
MinecraftForge.EVENT_BUS.register(MinestuckModelManager.class);
}
use of net.minecraft.client.model.ModelBiped in project ClaySoldiersMod by SanAndreasP.
the class SoldierModelRenderHandler method renderHideArmor.
private void renderHideArmor(EntityClayMan clayMan, RenderClayMan clayManRender, float partTicks, String armorUpgrade) {
ModelBiped model = clayManRender.modelBipedMain;
this.armorBody.rotateAngleX = model.bipedBody.rotateAngleX;
this.armorBody.rotateAngleY = model.bipedBody.rotateAngleY;
this.armorBody.rotateAngleZ = model.bipedBody.rotateAngleZ;
this.armorLeftArm.rotateAngleX = model.bipedLeftArm.rotateAngleX;
this.armorLeftArm.rotateAngleY = model.bipedLeftArm.rotateAngleY;
this.armorLeftArm.rotateAngleZ = model.bipedLeftArm.rotateAngleZ;
this.armorRightArm.rotateAngleX = model.bipedRightArm.rotateAngleX;
this.armorRightArm.rotateAngleY = model.bipedRightArm.rotateAngleY;
this.armorRightArm.rotateAngleZ = model.bipedRightArm.rotateAngleZ;
switch(armorUpgrade) {
case SoldierUpgrades.UPG_LEATHER:
clayManRender.bindTexture(Textures.CLAYMAN_LEATHER_ARMOR);
break;
case // todo: implement rabbit hide texture when 1.8 arrives
"not_implemented_rabbit_hide":
clayManRender.bindTexture(Textures.CLAYMAN_LEATHER_ARMOR);
break;
default:
return;
}
GL11.glPushMatrix();
GL11.glScalef(1.2F, 1.2F, 1.2F);
this.armorBody.render(partTicks);
this.armorLeftArm.render(partTicks);
this.armorRightArm.render(partTicks);
if (clayMan.hasUpgrade(SoldierUpgrades.UPG_IRON_INGOT)) {
this.buffedBody.render(partTicks);
}
GL11.glPopMatrix();
if (clayMan.hasUpgrade(SoldierUpgrades.UPG_WOOL)) {
float[] color = getSplittedColor(clayMan.getMiscColor());
clayManRender.bindTexture(Textures.CLAYMAN_PADDING);
GL11.glPushMatrix();
GL11.glScalef(1.1F, 1.1F, 1.1F);
GL11.glColor3f(color[0], color[1], color[2]);
this.armorBody.render(partTicks);
this.armorLeftArm.render(partTicks);
this.armorRightArm.render(partTicks);
GL11.glPopMatrix();
}
}
use of net.minecraft.client.model.ModelBiped in project ClaySoldiersMod by SanAndreasP.
the class SoldierModelRenderHandler method renderSlimefeet.
private void renderSlimefeet(RenderClayMan clayManRender, float partTicks) {
ModelBiped model = clayManRender.modelBipedMain;
this.slimeLeftLeg.rotateAngleX = model.bipedLeftLeg.rotateAngleX;
this.slimeLeftLeg.rotateAngleY = model.bipedLeftLeg.rotateAngleY;
this.slimeLeftLeg.rotateAngleZ = model.bipedLeftLeg.rotateAngleZ;
this.slimeRightLeg.rotateAngleX = model.bipedRightLeg.rotateAngleX;
this.slimeRightLeg.rotateAngleY = model.bipedRightLeg.rotateAngleY;
this.slimeRightLeg.rotateAngleZ = model.bipedRightLeg.rotateAngleZ;
clayManRender.bindTexture(Textures.CLAYMAN_SLIMEFEET);
GL11.glPushMatrix();
GL11.glScalef(1.2F, 1.2F, 1.2F);
GL11.glTranslatef(0.0F, -0.2F, 0.0F);
this.slimeLeftLeg.render(partTicks);
this.slimeRightLeg.render(partTicks);
GL11.glPopMatrix();
}
Aggregations