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


Java EntityShulker.getAttachmentFacing方法代码示例

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


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

示例1: rotateCorpse

import net.minecraft.entity.monster.EntityShulker; //导入方法依赖的package包/类
protected void rotateCorpse(EntityShulker entityLiving, float p_77043_2_, float p_77043_3_, float partialTicks)
{
    super.rotateCorpse(entityLiving, p_77043_2_, p_77043_3_, partialTicks);

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

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

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

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

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

        case UP:
            GlStateManager.translate(0.0F, 1.0F, 0.0F);
            GlStateManager.rotate(180.0F, 1.0F, 0.0F, 0.0F);
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:39,代码来源:RenderShulker.java

示例2: rotateCorpse

import net.minecraft.entity.monster.EntityShulker; //导入方法依赖的package包/类
protected void rotateCorpse(EntityShulker entityLiving, float p_77043_2_, float p_77043_3_, float partialTicks)
{
    super.rotateCorpse(entityLiving, p_77043_2_, p_77043_3_, partialTicks);

    switch (entityLiving.getAttachmentFacing())
    {
        case DOWN:
        default:
            break;
        case EAST:
            GlStateManager.translate(0.5F, 0.5F, 0.0F);
            GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
            GlStateManager.rotate(90.0F, 0.0F, 0.0F, 1.0F);
            break;
        case WEST:
            GlStateManager.translate(-0.5F, 0.5F, 0.0F);
            GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
            GlStateManager.rotate(-90.0F, 0.0F, 0.0F, 1.0F);
            break;
        case NORTH:
            GlStateManager.translate(0.0F, 0.5F, -0.5F);
            GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
            break;
        case SOUTH:
            GlStateManager.translate(0.0F, 0.5F, 0.5F);
            GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
            GlStateManager.rotate(180.0F, 0.0F, 0.0F, 1.0F);
            break;
        case UP:
            GlStateManager.translate(0.0F, 1.0F, 0.0F);
            GlStateManager.rotate(180.0F, 1.0F, 0.0F, 0.0F);
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:34,代码来源:RenderShulker.java

示例3: getHeadJointOffset

import net.minecraft.entity.monster.EntityShulker; //导入方法依赖的package包/类
@Override
public float[] getHeadJointOffset(EntityShulker living, float partialTick, int eye)
{
    switch (living.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);
    }
    return super.getHeadJointOffset(living, partialTick, eye);
}
 
开发者ID:iChun,项目名称:iChunUtil,代码行数:36,代码来源:HeadShulker.java

示例4: doRenderLayer

import net.minecraft.entity.monster.EntityShulker; //导入方法依赖的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.entity.monster.EntityShulker; //导入方法依赖的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.entity.monster.EntityShulker.getAttachmentFacing方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。