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


Java Material.ANVIL属性代码示例

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


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

示例1: getStrVsBlock

@Override
public float getStrVsBlock(ItemStack stack, IBlockState state) {
	//Certain materials are just effective with a pickaxe, and by extension, hammers.
       Material material = state.getMaterial();
       if (material == Material.IRON || material == Material.ANVIL || material == Material.ROCK) return this.efficiencyOnProperMaterial;
       
       if (WHITELIST.contains(state.getBlock())) return this.efficiencyOnProperMaterial;
       else return super.getStrVsBlock(stack, state);
   }
 
开发者ID:elytra,项目名称:Thermionics,代码行数:9,代码来源:ItemHammer.java

示例2: BlockAnvil

protected BlockAnvil()
{
    super(Material.ANVIL);
    this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(DAMAGE, Integer.valueOf(0)));
    this.setLightOpacity(0);
    this.setCreativeTab(CreativeTabs.DECORATIONS);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:7,代码来源:BlockAnvil.java

示例3: BlockTesla

public BlockTesla() {
    super(Material.ANVIL);
    setCreativeTab(EonContent.TAB);
    setUnlocalizedName("tesla");
    setLightOpacity(0);
}
 
开发者ID:Guichaguri,项目名称:ProjectEon,代码行数:6,代码来源:BlockTesla.java

示例4: TestBlock

TestBlock()
{
    super(Material.ANVIL);
}
 
开发者ID:cubex2,项目名称:customstuff4,代码行数:4,代码来源:BitStateMetaMapperTests.java

示例5: canHarvestBlock

public boolean canHarvestBlock(IBlockState blockIn)
{
    Block block = blockIn.getBlock();

    if (block == Blocks.OBSIDIAN)
    {
        return this.toolMaterial.getHarvestLevel() == 3;
    }
    else if (block != Blocks.DIAMOND_BLOCK && block != Blocks.DIAMOND_ORE)
    {
        if (block != Blocks.EMERALD_ORE && block != Blocks.EMERALD_BLOCK)
        {
            if (block != Blocks.GOLD_BLOCK && block != Blocks.GOLD_ORE)
            {
                if (block != Blocks.IRON_BLOCK && block != Blocks.IRON_ORE)
                {
                    if (block != Blocks.LAPIS_BLOCK && block != Blocks.LAPIS_ORE)
                    {
                        if (block != Blocks.REDSTONE_ORE && block != Blocks.LIT_REDSTONE_ORE)
                        {
                            Material material = blockIn.getMaterial();
                            return material == Material.ROCK ? true : (material == Material.IRON ? true : material == Material.ANVIL);
                        }
                        else
                        {
                            return this.toolMaterial.getHarvestLevel() >= 2;
                        }
                    }
                    else
                    {
                        return this.toolMaterial.getHarvestLevel() >= 1;
                    }
                }
                else
                {
                    return this.toolMaterial.getHarvestLevel() >= 1;
                }
            }
            else
            {
                return this.toolMaterial.getHarvestLevel() >= 2;
            }
        }
        else
        {
            return this.toolMaterial.getHarvestLevel() >= 2;
        }
    }
    else
    {
        return this.toolMaterial.getHarvestLevel() >= 2;
    }
}
 
开发者ID:bafomdad,项目名称:uniquecrops,代码行数:53,代码来源:ItemPrecisionPick.java

示例6: getStrVsBlock

public float getStrVsBlock(ItemStack stack, IBlockState state)
{
    Material material = state.getMaterial();
    return material != Material.IRON && material != Material.ANVIL && material != Material.ROCK ? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial;
}
 
开发者ID:bafomdad,项目名称:uniquecrops,代码行数:5,代码来源:ItemPrecisionPick.java

示例7: canHarvestBlock

/**
 * Check whether this Item can harvest the given Block
 */
public boolean canHarvestBlock(IBlockState blockIn)
{
    Block block = blockIn.getBlock();

    if (block == Blocks.OBSIDIAN)
    {
        return this.toolMaterial.getHarvestLevel() == 3;
    }
    else if (block != Blocks.DIAMOND_BLOCK && block != Blocks.DIAMOND_ORE)
    {
        if (block != Blocks.EMERALD_ORE && block != Blocks.EMERALD_BLOCK)
        {
            if (block != Blocks.GOLD_BLOCK && block != Blocks.GOLD_ORE)
            {
                if (block != Blocks.IRON_BLOCK && block != Blocks.IRON_ORE)
                {
                    if (block != Blocks.LAPIS_BLOCK && block != Blocks.LAPIS_ORE)
                    {
                        if (block != Blocks.REDSTONE_ORE && block != Blocks.LIT_REDSTONE_ORE)
                        {
                            Material material = blockIn.getMaterial();
                            return material == Material.ROCK ? true : (material == Material.IRON ? true : material == Material.ANVIL);
                        }
                        else
                        {
                            return this.toolMaterial.getHarvestLevel() >= 2;
                        }
                    }
                    else
                    {
                        return this.toolMaterial.getHarvestLevel() >= 1;
                    }
                }
                else
                {
                    return this.toolMaterial.getHarvestLevel() >= 1;
                }
            }
            else
            {
                return this.toolMaterial.getHarvestLevel() >= 2;
            }
        }
        else
        {
            return this.toolMaterial.getHarvestLevel() >= 2;
        }
    }
    else
    {
        return this.toolMaterial.getHarvestLevel() >= 2;
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:56,代码来源:ItemPickaxe.java

示例8: canHarvestBlock

@Override
public boolean canHarvestBlock(IBlockState blockIn)
   {
	return blockIn.getMaterial() == Material.ROCK || ((blockIn.getMaterial() == Material.IRON || blockIn.getMaterial() == Material.ANVIL) || super.canHarvestBlock(blockIn));
   }
 
开发者ID:V0idWa1k3r,项目名称:ExPetrum,代码行数:5,代码来源:ItemPickaxe.java

示例9: getStrVsBlock

@Override
public float getStrVsBlock(ItemStack stack, IBlockState state)
   {
       Material material = state.getMaterial();
       return material != Material.IRON && material != Material.ANVIL && material != Material.ROCK ? super.getStrVsBlock(stack, state) : this.getStats(stack).getEfficiency();
   }
 
开发者ID:V0idWa1k3r,项目名称:ExPetrum,代码行数:6,代码来源:ItemPickaxe.java


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