本文整理匯總了Java中net.minecraft.entity.passive.EntitySheep.hasCustomName方法的典型用法代碼示例。如果您正苦於以下問題:Java EntitySheep.hasCustomName方法的具體用法?Java EntitySheep.hasCustomName怎麽用?Java EntitySheep.hasCustomName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraft.entity.passive.EntitySheep
的用法示例。
在下文中一共展示了EntitySheep.hasCustomName方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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);
}
}
示例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);
}
}
示例3: 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);
}
}