本文整理汇总了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);
}
示例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);
}
示例3: BlockTesla
public BlockTesla() {
super(Material.ANVIL);
setCreativeTab(EonContent.TAB);
setUnlocalizedName("tesla");
setLightOpacity(0);
}
示例4: TestBlock
TestBlock()
{
super(Material.ANVIL);
}
示例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;
}
}
示例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;
}
示例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;
}
}
示例8: canHarvestBlock
@Override
public boolean canHarvestBlock(IBlockState blockIn)
{
return blockIn.getMaterial() == Material.ROCK || ((blockIn.getMaterial() == Material.IRON || blockIn.getMaterial() == Material.ANVIL) || super.canHarvestBlock(blockIn));
}
示例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();
}