本文整理汇总了Java中net.minecraft.entity.passive.EntitySheep.isInvisible方法的典型用法代码示例。如果您正苦于以下问题:Java EntitySheep.isInvisible方法的具体用法?Java EntitySheep.isInvisible怎么用?Java EntitySheep.isInvisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.entity.passive.EntitySheep
的用法示例。
在下文中一共展示了EntitySheep.isInvisible方法的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);
}
}
示例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);
}
}
示例4: doRenderLayer
import net.minecraft.entity.passive.EntitySheep; //导入方法依赖的package包/类
@SuppressWarnings("ConstantConditions")
@Override
public void doRenderLayer(EntitySheep sheep, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
if (!sheep.getSheared() && !sheep.isInvisible())
{
final IChiseledSheepCapability capability = sheep.getCapability(Capability.CHISELED_SHEEP, null);
if (capability.isChiseled())
{
final int itemIdentifier = capability.getItemIdentifier();
final ItemStack itemStack = capability.getChiselItemStack();
try
{
if (Settings.debugModels()) {
modelCache.invalidate(itemIdentifier);
}
sheepModel = modelCache.get(itemIdentifier, () ->
{
try {
if (badModels.contains(itemIdentifier)) {
return errorModelMaker.createModel(null, sheep);
}
final IModelMaker variationModelMaker = VariationRegistry.INSTANCE.getVariationModelMaker(itemStack);
return variationModelMaker.createModel(itemStack, sheep);
} catch (Exception e) {
Logger.log(Level.INFO, e, "Error creating chiseled sheep model, item stack was %s", itemStack);
return errorModelMaker.createModel(null, sheep);
}
});
sheepRenderer.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
final Item item = itemStack.getItem();
if (item instanceof ItemBlock)
{
final int colorMultiplier = Minecraft.getMinecraft().getBlockColors().colorMultiplier(((ItemBlock) item).block.getDefaultState(), sheep.worldObj, sheep.getPosition(), 0);
GlStateManager.color(
(colorMultiplier >> 16 & 255) / 255.0F, //Red
(colorMultiplier >> 8 & 255) / 255.0F, //Green
(colorMultiplier & 255) / 255.0F); //Blue
}
renderModel(sheep, limbSwing, limbSwingAmount, partialTicks, ageInTicks, netHeadYaw, headPitch, scale);
} catch (final Exception exception) {
badModels.add(itemIdentifier);
modelCache.put(itemIdentifier, errorModelMaker.createModel(null, sheep));
Logger.warning("Error rendering chiselled sheep with item %s - %s", itemStack, exception);
exception.printStackTrace();
}
} else
{
sheepModel = defaultBody;
sheepRenderer.bindTexture(TEXTURE);
final float[] afloat = EntitySheep.getDyeRgb(sheep.getFleeceColor());
GlStateManager.color(afloat[0], afloat[1], afloat[2]);
renderModel(sheep, limbSwing, limbSwingAmount, partialTicks, ageInTicks, netHeadYaw, headPitch, scale);
}
}
}