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


Java EntitySheep.getEntityId方法代码示例

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


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

示例1: doRenderLayer

import net.minecraft.entity.passive.EntitySheep; //导入方法依赖的package包/类
public void doRenderLayer(EntitySheep entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
{
    if (!entitylivingbaseIn.getSheared() && !entitylivingbaseIn.isInvisible())
    {
        this.sheepRenderer.bindTexture(TEXTURE);

        if (entitylivingbaseIn.hasCustomName() && "jeb_".equals(entitylivingbaseIn.getCustomNameTag()))
        {
            int i1 = 25;
            int i = entitylivingbaseIn.ticksExisted / 25 + entitylivingbaseIn.getEntityId();
            int j = EnumDyeColor.values().length;
            int k = i % j;
            int l = (i + 1) % j;
            float f = ((float)(entitylivingbaseIn.ticksExisted % 25) + partialTicks) / 25.0F;
            float[] afloat1 = EntitySheep.func_175513_a(EnumDyeColor.byMetadata(k));
            float[] afloat2 = EntitySheep.func_175513_a(EnumDyeColor.byMetadata(l));
            GlStateManager.color(afloat1[0] * (1.0F - f) + afloat2[0] * f, afloat1[1] * (1.0F - f) + afloat2[1] * f, afloat1[2] * (1.0F - f) + afloat2[2] * f);
        }
        else
        {
            float[] afloat = EntitySheep.func_175513_a(entitylivingbaseIn.getFleeceColor());
            GlStateManager.color(afloat[0], afloat[1], afloat[2]);
        }

        this.sheepModel.setModelAttributes(this.sheepRenderer.getMainModel());
        this.sheepModel.setLivingAnimations(entitylivingbaseIn, p_177141_2_, p_177141_3_, partialTicks);
        this.sheepModel.render(entitylivingbaseIn, p_177141_2_, p_177141_3_, p_177141_5_, p_177141_6_, p_177141_7_, scale);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:30,代码来源:LayerSheepWool.java

示例2: doRenderLayer

import net.minecraft.entity.passive.EntitySheep; //导入方法依赖的package包/类
public void doRenderLayer(EntitySheep entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
    if (!entitylivingbaseIn.getSheared() && !entitylivingbaseIn.isInvisible())
    {
        this.sheepRenderer.bindTexture(TEXTURE);

        if (entitylivingbaseIn.hasCustomName() && "jeb_".equals(entitylivingbaseIn.getCustomNameTag()))
        {
            int i1 = 25;
            int i = entitylivingbaseIn.ticksExisted / 25 + entitylivingbaseIn.getEntityId();
            int j = EnumDyeColor.values().length;
            int k = i % j;
            int l = (i + 1) % j;
            float f = ((float)(entitylivingbaseIn.ticksExisted % 25) + partialTicks) / 25.0F;
            float[] afloat1 = EntitySheep.getDyeRgb(EnumDyeColor.byMetadata(k));
            float[] afloat2 = EntitySheep.getDyeRgb(EnumDyeColor.byMetadata(l));
            GlStateManager.color(afloat1[0] * (1.0F - f) + afloat2[0] * f, afloat1[1] * (1.0F - f) + afloat2[1] * f, afloat1[2] * (1.0F - f) + afloat2[2] * f);
        }
        else
        {
            float[] afloat = EntitySheep.getDyeRgb(entitylivingbaseIn.getFleeceColor());
            GlStateManager.color(afloat[0], afloat[1], afloat[2]);
        }

        this.sheepModel.setModelAttributes(this.sheepRenderer.getMainModel());
        this.sheepModel.setLivingAnimations(entitylivingbaseIn, limbSwing, limbSwingAmount, partialTicks);
        this.sheepModel.render(entitylivingbaseIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:30,代码来源:LayerSheepWool.java

示例3: shouldRenderPass

import net.minecraft.entity.passive.EntitySheep; //导入方法依赖的package包/类
protected int shouldRenderPass(EntitySheep p_77032_1_, int p_77032_2_, float p_77032_3_)
{
    if (p_77032_2_ == 0 && !p_77032_1_.getSheared())
    {
        this.bindTexture(sheepTextures);

        if (p_77032_1_.hasCustomNameTag() && "jeb_".equals(p_77032_1_.getCustomNameTag()))
        {
            boolean flag = true;
            int k = p_77032_1_.ticksExisted / 25 + p_77032_1_.getEntityId();
            int l = k % EntitySheep.fleeceColorTable.length;
            int i1 = (k + 1) % EntitySheep.fleeceColorTable.length;
            float f1 = ((float)(p_77032_1_.ticksExisted % 25) + p_77032_3_) / 25.0F;
            GL11.glColor3f(EntitySheep.fleeceColorTable[l][0] * (1.0F - f1) + EntitySheep.fleeceColorTable[i1][0] * f1, EntitySheep.fleeceColorTable[l][1] * (1.0F - f1) + EntitySheep.fleeceColorTable[i1][1] * f1, EntitySheep.fleeceColorTable[l][2] * (1.0F - f1) + EntitySheep.fleeceColorTable[i1][2] * f1);
        }
        else
        {
            int j = p_77032_1_.getFleeceColor();
            GL11.glColor3f(EntitySheep.fleeceColorTable[j][0], EntitySheep.fleeceColorTable[j][1], EntitySheep.fleeceColorTable[j][2]);
        }

        return 1;
    }
    else
    {
        return -1;
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:29,代码来源:RenderSheep.java

示例4: doRenderLayer

import net.minecraft.entity.passive.EntitySheep; //导入方法依赖的package包/类
public void doRenderLayer(EntitySheep entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
    if (!entitylivingbaseIn.getSheared() && !entitylivingbaseIn.isInvisible())
    {
        this.sheepRenderer.bindTexture(TEXTURE);

        if (entitylivingbaseIn.hasCustomName() && "jeb_".equals(entitylivingbaseIn.getCustomNameTag()))
        {
            int i1 = 25;
            int i = entitylivingbaseIn.ticksExisted / 25 + entitylivingbaseIn.getEntityId();
            int j = EnumDyeColor.values().length;
            int k = i % j;
            int l = (i + 1) % j;
            float f = ((float)(entitylivingbaseIn.ticksExisted % 25) + partialTicks) / 25.0F;
            float[] afloat1 = EntitySheep.getDyeRgb(EnumDyeColor.byMetadata(k));
            float[] afloat2 = EntitySheep.getDyeRgb(EnumDyeColor.byMetadata(l));

            if (Config.isCustomColors())
            {
                afloat1 = CustomColors.getSheepColors(EnumDyeColor.byMetadata(k), afloat1);
                afloat2 = CustomColors.getSheepColors(EnumDyeColor.byMetadata(l), afloat2);
            }

            GlStateManager.color(afloat1[0] * (1.0F - f) + afloat2[0] * f, afloat1[1] * (1.0F - f) + afloat2[1] * f, afloat1[2] * (1.0F - f) + afloat2[2] * f);
        }
        else
        {
            float[] afloat = EntitySheep.getDyeRgb(entitylivingbaseIn.getFleeceColor());

            if (Config.isCustomColors())
            {
                afloat = CustomColors.getSheepColors(entitylivingbaseIn.getFleeceColor(), afloat);
            }

            GlStateManager.color(afloat[0], afloat[1], afloat[2]);
        }

        this.sheepModel.setModelAttributes(this.sheepRenderer.getMainModel());
        this.sheepModel.setLivingAnimations(entitylivingbaseIn, limbSwing, limbSwingAmount, partialTicks);
        this.sheepModel.render(entitylivingbaseIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:43,代码来源:LayerSheepWool.java


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