本文整理汇总了Java中net.minecraft.item.EnumDyeColor.byMetadata方法的典型用法代码示例。如果您正苦于以下问题:Java EnumDyeColor.byMetadata方法的具体用法?Java EnumDyeColor.byMetadata怎么用?Java EnumDyeColor.byMetadata使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.item.EnumDyeColor
的用法示例。
在下文中一共展示了EnumDyeColor.byMetadata方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doRenderLayer
import net.minecraft.item.EnumDyeColor; //导入方法依赖的package包/类
public void doRenderLayer(EntityWolf 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.isTamed() && !entitylivingbaseIn.isInvisible())
{
this.wolfRenderer.bindTexture(WOLF_COLLAR);
EnumDyeColor enumdyecolor = EnumDyeColor.byMetadata(entitylivingbaseIn.getCollarColor().getMetadata());
float[] afloat = EntitySheep.func_175513_a(enumdyecolor);
GlStateManager.color(afloat[0], afloat[1], afloat[2]);
this.wolfRenderer.getMainModel().render(entitylivingbaseIn, p_177141_2_, p_177141_3_, p_177141_5_, p_177141_6_, p_177141_7_, scale);
}
}
示例2: TubeItem
import net.minecraft.item.EnumDyeColor; //导入方法依赖的package包/类
public TubeItem(TileTube parent, NBTTagCompound nbt) {
this.parent = parent;
this.id = nbt.getInteger("id");
this.itemStack = new ItemStack(nbt);
this.progress = nbt.getFloat("progress");
if (nbt.hasKey("dir"))
this.direction = EnumFacing.VALUES[nbt.getInteger("dir")];
else
this.direction = null;
if (nbt.hasKey("color") && nbt.getInteger("color") > -1)
this.color = EnumDyeColor.byMetadata(nbt.getInteger("color"));
}
示例3: onSyncPacket
import net.minecraft.item.EnumDyeColor; //导入方法依赖的package包/类
public void onSyncPacket(float progress, EnumFacing direction, int color) {
this.progress = progress;
this.direction = direction;
if (color > -1)
this.color = EnumDyeColor.byMetadata(color);
else
this.color = null;
}
示例4: setColor
import net.minecraft.item.EnumDyeColor; //导入方法依赖的package包/类
public void setColor(int c) {
if (c == -1)
this.color = null;
else
this.color = EnumDyeColor.byMetadata(c);
}
示例5: doRenderLayer
import net.minecraft.item.EnumDyeColor; //导入方法依赖的package包/类
public void doRenderLayer(EntityWolf entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
if (entitylivingbaseIn.isTamed() && !entitylivingbaseIn.isInvisible())
{
this.wolfRenderer.bindTexture(WOLF_COLLAR);
EnumDyeColor enumdyecolor = EnumDyeColor.byMetadata(entitylivingbaseIn.getCollarColor().getMetadata());
float[] afloat = EntitySheep.getDyeRgb(enumdyecolor);
GlStateManager.color(afloat[0], afloat[1], afloat[2]);
this.wolfRenderer.getMainModel().render(entitylivingbaseIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);
}
}
示例6: readDataNBT
import net.minecraft.item.EnumDyeColor; //导入方法依赖的package包/类
@Override
void readDataNBT(NBTTagCompound cmp) {
lit = cmp.getBoolean("lit");
color = EnumDyeColor.byMetadata(cmp.getInteger("color"));
}
示例7: getUnlocalizedName
import net.minecraft.item.EnumDyeColor; //导入方法依赖的package包/类
@Override
public String getUnlocalizedName(ItemStack stack) {
return super.getUnlocalizedName() + "." + EnumDyeColor.byMetadata(stack.getMetadata());
}
示例8: createNewTileEntity
import net.minecraft.item.EnumDyeColor; //导入方法依赖的package包/类
@Override
public TileEntity createNewTileEntity(World worldIn, int meta) {
return new TileCandle(getType(), EnumDyeColor.byMetadata(meta));
}
示例9: getFleeceColor
import net.minecraft.item.EnumDyeColor; //导入方法依赖的package包/类
/**
* Gets the wool color of this sheep.
*/
public EnumDyeColor getFleeceColor()
{
return EnumDyeColor.byMetadata(this.dataWatcher.getWatchableObjectByte(16) & 15);
}
示例10: func_190704_dO
import net.minecraft.item.EnumDyeColor; //导入方法依赖的package包/类
@Nullable
public EnumDyeColor func_190704_dO()
{
int i = ((Integer)this.dataManager.get(field_190721_bH)).intValue();
return i == -1 ? null : EnumDyeColor.byMetadata(i);
}
示例11: getFleeceColor
import net.minecraft.item.EnumDyeColor; //导入方法依赖的package包/类
/**
* Gets the wool color of this sheep.
*/
public EnumDyeColor getFleeceColor()
{
return EnumDyeColor.byMetadata(((Byte)this.dataManager.get(DYE_COLOR)).byteValue() & 15);
}
示例12: func_190769_dn
import net.minecraft.item.EnumDyeColor; //导入方法依赖的package包/类
public EnumDyeColor func_190769_dn()
{
return EnumDyeColor.byMetadata(((Byte)this.dataManager.get(field_190770_bw)).byteValue());
}