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


Java EnumDyeColor.values方法代码示例

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


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

示例1: addDyeRecipes

import net.minecraft.item.EnumDyeColor; //导入方法依赖的package包/类
public static void addDyeRecipes(IForgeRegistry<IRecipe> registry, BlockColored block) {
	ResourceLocation group = new ResourceLocation("thermionics_world", "dye");
	for(EnumDyeColor dye : EnumDyeColor.values()) {
		ShapelessOreRecipe recipe =
				new ShapelessOreRecipe(group, new ItemStack(TWBlocks.NORFAIRITE_CLEAR,1,dye.getMetadata()),
				new ItemStack(Items.DYE,1,dye.getDyeDamage()),
				new ItemStack(TWBlocks.NORFAIRITE_CLEAR,1,OreDictionary.WILDCARD_VALUE));
		recipe.setRegistryName(new ResourceLocation("thermionics_world", block.getRegistryName().getResourcePath()+"_DyeTo_"+dye.getUnlocalizedName()) );
		registry.register(recipe);
	}
}
 
开发者ID:elytra,项目名称:ThermionicsWorld,代码行数:12,代码来源:ThermionicsWorld.java

示例2: addRecipes

import net.minecraft.item.EnumDyeColor; //导入方法依赖的package包/类
/**
 * Adds the banner recipes to the CraftingManager.
 */
void addRecipes(CraftingManager p_179534_1_)
{
    for (EnumDyeColor enumdyecolor : EnumDyeColor.values())
    {
        p_179534_1_.addRecipe(new ItemStack(Items.banner, 1, enumdyecolor.getDyeDamage()), new Object[] {"###", "###", " | ", '#', new ItemStack(Blocks.wool, 1, enumdyecolor.getMetadata()), '|', Items.stick});
    }

    p_179534_1_.addRecipe(new RecipesBanners.RecipeDuplicatePattern());
    p_179534_1_.addRecipe(new RecipesBanners.RecipeAddPattern());
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:14,代码来源:RecipesBanners.java

示例3: getSubBlocks

import net.minecraft.item.EnumDyeColor; //导入方法依赖的package包/类
/**
 * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
 */
public void getSubBlocks(Item itemIn, CreativeTabs tab, List<ItemStack> list)
{
    for (EnumDyeColor enumdyecolor : EnumDyeColor.values())
    {
        list.add(new ItemStack(itemIn, 1, enumdyecolor.getMetadata()));
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:11,代码来源:BlockStainedGlass.java

示例4: getSubBlocks

import net.minecraft.item.EnumDyeColor; //导入方法依赖的package包/类
/**
 * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
 */
public void getSubBlocks(Item itemIn, CreativeTabs tab, List<ItemStack> list)
{
    for (int i = 0; i < EnumDyeColor.values().length; ++i)
    {
        list.add(new ItemStack(itemIn, 1, i));
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:11,代码来源:BlockStainedGlassPane.java

示例5: addRecipes

import net.minecraft.item.EnumDyeColor; //导入方法依赖的package包/类
/**
 * Adds the banner recipes to the CraftingManager.
 */
void addRecipes(CraftingManager manager)
{
    for (EnumDyeColor enumdyecolor : EnumDyeColor.values())
    {
        manager.addRecipe(ItemBanner.func_190910_a(enumdyecolor, (NBTTagList)null), new Object[] {"###", "###", " | ", '#', new ItemStack(Blocks.WOOL, 1, enumdyecolor.getMetadata()), '|', Items.STICK});
    }

    manager.addRecipe(new RecipesBanners.RecipeDuplicatePattern());
    manager.addRecipe(new RecipesBanners.RecipeAddPattern());
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:14,代码来源:RecipesBanners.java

示例6: getSubBlocks

import net.minecraft.item.EnumDyeColor; //导入方法依赖的package包/类
/**
 * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
 */
public void getSubBlocks(Item itemIn, CreativeTabs tab, NonNullList<ItemStack> list)
{
    for (EnumDyeColor enumdyecolor : EnumDyeColor.values())
    {
        list.add(new ItemStack(itemIn, 1, enumdyecolor.getMetadata()));
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:11,代码来源:BlockColored.java

示例7: getSubBlocks

import net.minecraft.item.EnumDyeColor; //导入方法依赖的package包/类
/**
 * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
 */
public void getSubBlocks(Item itemIn, CreativeTabs tab, NonNullList<ItemStack> list)
{
    for (int i = 0; i < EnumDyeColor.values().length; ++i)
    {
        list.add(new ItemStack(itemIn, 1, i));
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:11,代码来源:BlockStainedGlassPane.java

示例8: doRenderLayer

import net.minecraft.item.EnumDyeColor; //导入方法依赖的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

示例9: doRenderLayer

import net.minecraft.item.EnumDyeColor; //导入方法依赖的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:SkidJava,项目名称:BaseClient,代码行数:30,代码来源:LayerSheepWool.java

示例10: addRecipes

import net.minecraft.item.EnumDyeColor; //导入方法依赖的package包/类
/**
 * Adds the banner recipes to the CraftingManager.
 */
void addRecipes(CraftingManager manager)
{
    for (EnumDyeColor enumdyecolor : EnumDyeColor.values())
    {
        manager.addRecipe(new ItemStack(Items.BANNER, 1, enumdyecolor.getDyeDamage()), new Object[] {"###", "###", " | ", '#', new ItemStack(Blocks.WOOL, 1, enumdyecolor.getMetadata()), '|', Items.STICK});
    }

    manager.addRecipe(new RecipesBanners.RecipeDuplicatePattern());
    manager.addRecipe(new RecipesBanners.RecipeAddPattern());
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:14,代码来源:RecipesBanners.java

示例11: getSubBlocks

import net.minecraft.item.EnumDyeColor; //导入方法依赖的package包/类
/**
 * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
 */
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item itemIn, CreativeTabs tab, List<ItemStack> list)
{
    for (int i = 0; i < EnumDyeColor.values().length; ++i)
    {
        list.add(new ItemStack(itemIn, 1, i));
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:12,代码来源:BlockStainedGlassPane.java

示例12: doRenderLayer

import net.minecraft.item.EnumDyeColor; //导入方法依赖的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

示例13: readDyeColors

import net.minecraft.item.EnumDyeColor; //导入方法依赖的package包/类
private static float[][] readDyeColors(Properties p_readDyeColors_0_, String p_readDyeColors_1_, String p_readDyeColors_2_, String p_readDyeColors_3_)
{
    EnumDyeColor[] aenumdyecolor = EnumDyeColor.values();
    Map<String, EnumDyeColor> map = new HashMap();

    for (int i = 0; i < aenumdyecolor.length; ++i)
    {
        EnumDyeColor enumdyecolor = aenumdyecolor[i];
        map.put(enumdyecolor.getName(), enumdyecolor);
    }

    float[][] afloat1 = new float[aenumdyecolor.length][];
    int k = 0;

    for (Object s : p_readDyeColors_0_.keySet())
    {
        String s1 = p_readDyeColors_0_.getProperty((String) s);

        if (((String) s).startsWith(p_readDyeColors_2_))
        {
            String s2 = StrUtils.removePrefix((String) s, p_readDyeColors_2_);

            if (s2.equals("lightBlue"))
            {
                s2 = "light_blue";
            }

            EnumDyeColor enumdyecolor1 = (EnumDyeColor)map.get(s2);
            int j = parseColor(s1);

            if (enumdyecolor1 != null && j >= 0)
            {
                float[] afloat = new float[] {(float)(j >> 16 & 255) / 255.0F, (float)(j >> 8 & 255) / 255.0F, (float)(j & 255) / 255.0F};
                afloat1[enumdyecolor1.ordinal()] = afloat;
                ++k;
            }
            else
            {
                warn("Invalid color: " + s + " = " + s1);
            }
        }
    }

    if (k <= 0)
    {
        return (float[][])null;
    }
    else
    {
        dbg(p_readDyeColors_3_ + " colors: " + k);
        return afloat1;
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:54,代码来源:CustomColors.java


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