本文整理汇总了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();
}