當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。