当前位置: 首页>>代码示例>>Java>>正文


Java ModelRenderer.render方法代码示例

本文整理汇总了Java中net.minecraft.client.model.ModelRenderer.render方法的典型用法代码示例。如果您正苦于以下问题:Java ModelRenderer.render方法的具体用法?Java ModelRenderer.render怎么用?Java ModelRenderer.render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.client.model.ModelRenderer的用法示例。


在下文中一共展示了ModelRenderer.render方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: renderDynamic

import net.minecraft.client.model.ModelRenderer; //导入方法依赖的package包/类
@Override
protected void renderDynamic(float scale, float partialTicks) {
    ModelRenderer base;
    if (module.getTicksSinceAction() >= 0) {
        base = action;
    } else if (module.getTicksSinceNotEnoughAir() >= 0) {
        base = notEnoughAir;
    } else {
        base = module.hasPower() ? powered : notPowered;
    }
    base.render(scale);
    base2.render(scale);
    renderChannelColorFrame(scale);
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:15,代码来源:ModelLogistics.java

示例2: renderPole

import net.minecraft.client.model.ModelRenderer; //导入方法依赖的package包/类
private void renderPole(ModelRenderer pole, int idx, float scale, float extension) {
    GlStateManager.translate(0, -extension / 4, 0);
    GlStateManager.pushMatrix();
    GlStateManager.translate(0, FACTOR, 0);
    GlStateManager.scale(1, extension * 16 / 14 / 4, 1);
    GlStateManager.translate(0, -FACTOR, 0);
    GlStateManager.color(1 - idx * 0.15f, 1 - idx * 0.15f, 1 - idx * 0.15f, 1);
    pole.render(scale);
    GlStateManager.popMatrix();
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:11,代码来源:ModelElevatorBase.java

示例3: renderAndRotate

import net.minecraft.client.model.ModelRenderer; //导入方法依赖的package包/类
private void renderAndRotate(ArrayList<ModelRenderer> list, ModelRenderer parent, float scale)
{
	for(ModelRenderer renderer : list)
	{
		copyModelAngles(parent, renderer);
		if(rotations.keySet().contains(renderer))
			addAngle(renderer);
		renderer.render(scale);
	}
}
 
开发者ID:kenijey,项目名称:harshencastle,代码行数:11,代码来源:ModelArmour.java

示例4: doRenderLayer

import net.minecraft.client.model.ModelRenderer; //导入方法依赖的package包/类
public void doRenderLayer(EntityShulker entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
    GlStateManager.pushMatrix();

    switch (entitylivingbaseIn.getAttachmentFacing())
    {
        case DOWN:
        default:
            break;

        case EAST:
            GlStateManager.rotate(90.0F, 0.0F, 0.0F, 1.0F);
            GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
            GlStateManager.translate(1.0F, -1.0F, 0.0F);
            GlStateManager.rotate(180.0F, 0.0F, 1.0F, 0.0F);
            break;

        case WEST:
            GlStateManager.rotate(-90.0F, 0.0F, 0.0F, 1.0F);
            GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
            GlStateManager.translate(-1.0F, -1.0F, 0.0F);
            GlStateManager.rotate(180.0F, 0.0F, 1.0F, 0.0F);
            break;

        case NORTH:
            GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
            GlStateManager.translate(0.0F, -1.0F, -1.0F);
            break;

        case SOUTH:
            GlStateManager.rotate(180.0F, 0.0F, 0.0F, 1.0F);
            GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
            GlStateManager.translate(0.0F, -1.0F, 1.0F);
            break;

        case UP:
            GlStateManager.rotate(180.0F, 1.0F, 0.0F, 0.0F);
            GlStateManager.translate(0.0F, -2.0F, 0.0F);
    }

    ModelRenderer modelrenderer = RenderShulker.this.getMainModel().head;
    modelrenderer.rotateAngleY = netHeadYaw * 0.017453292F;
    modelrenderer.rotateAngleX = headPitch * 0.017453292F;
    RenderShulker.this.bindTexture(RenderShulker.SHULKER_ENDERGOLEM_TEXTURE[entitylivingbaseIn.func_190769_dn().getMetadata()]);
    modelrenderer.render(scale);
    GlStateManager.popMatrix();
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:48,代码来源:RenderShulker.java

示例5: doRenderLayer

import net.minecraft.client.model.ModelRenderer; //导入方法依赖的package包/类
public void doRenderLayer(EntityShulker entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
    GlStateManager.pushMatrix();

    switch (entitylivingbaseIn.getAttachmentFacing())
    {
        case DOWN:
        default:
            break;
        case EAST:
            GlStateManager.rotate(90.0F, 0.0F, 0.0F, 1.0F);
            GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
            GlStateManager.translate(1.0F, -1.0F, 0.0F);
            GlStateManager.rotate(180.0F, 0.0F, 1.0F, 0.0F);
            break;
        case WEST:
            GlStateManager.rotate(-90.0F, 0.0F, 0.0F, 1.0F);
            GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
            GlStateManager.translate(-1.0F, -1.0F, 0.0F);
            GlStateManager.rotate(180.0F, 0.0F, 1.0F, 0.0F);
            break;
        case NORTH:
            GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
            GlStateManager.translate(0.0F, -1.0F, -1.0F);
            break;
        case SOUTH:
            GlStateManager.rotate(180.0F, 0.0F, 0.0F, 1.0F);
            GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
            GlStateManager.translate(0.0F, -1.0F, 1.0F);
            break;
        case UP:
            GlStateManager.rotate(180.0F, 1.0F, 0.0F, 0.0F);
            GlStateManager.translate(0.0F, -2.0F, 0.0F);
    }

    ModelRenderer modelrenderer = ((ModelShulker)RenderShulker.this.getMainModel()).head;
    modelrenderer.rotateAngleY = netHeadYaw * 0.017453292F;
    modelrenderer.rotateAngleX = headPitch * 0.017453292F;
    RenderShulker.this.bindTexture(RenderShulker.SHULKER_ENDERGOLEM_TEXTURE);
    modelrenderer.render(scale);
    GlStateManager.popMatrix();
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:43,代码来源:RenderShulker.java


注:本文中的net.minecraft.client.model.ModelRenderer.render方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。