本文整理匯總了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);
}
示例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();
}
示例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);
}
}
示例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();
}
示例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();
}