本文整理汇总了Java中net.minecraft.block.material.Material.CRAFTED_SNOW属性的典型用法代码示例。如果您正苦于以下问题:Java Material.CRAFTED_SNOW属性的具体用法?Java Material.CRAFTED_SNOW怎么用?Java Material.CRAFTED_SNOW使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类net.minecraft.block.material.Material
的用法示例。
在下文中一共展示了Material.CRAFTED_SNOW属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDestroySpeed
@Override
public float getDestroySpeed(ItemStack stack, IBlockState state) {
for (String type : getToolClasses(stack)) {
if (state.getBlock().isToolEffective(type, state) || state.getMaterial() == Material.GROUND
|| state.getMaterial() == Material.GRASS || state.getMaterial() == Material.SAND
|| state.getMaterial() == Material.SNOW || state.getMaterial() == Material.CRAFTED_SNOW
|| state.getMaterial() == Material.CLAY) {
return getEfficiency(stack);
}
}
return 1.0F;
}
示例2: getStrVsBlock
@Override
public float getStrVsBlock(ItemStack stack, IBlockState state)
{
Material material = state.getMaterial();
float ret = material != Material.GRASS && material != Material.GROUND && material != Material.CRAFTED_SNOW && material != Material.SNOW && material != Material.SAND && material != Material.CLAY && material != Material.GOURD ? super.getStrVsBlock(stack, state) : this.getStats(stack).getEfficiency();
return ret * 0.75F;
}
示例3: BlockSnowBlock
protected BlockSnowBlock()
{
super(Material.CRAFTED_SNOW);
this.setTickRandomly(true);
this.setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
}
示例4: getStrVsBlock
@Override
public float getStrVsBlock(ItemStack stack, IBlockState state)
{
Material material = state.getMaterial();
return material != Material.GRASS && material != Material.GROUND && material != Material.CRAFTED_SNOW && material != Material.SNOW && material != Material.SAND && material != Material.CLAY && material != Material.GOURD ? super.getStrVsBlock(stack, state) : this.getStats(stack).getEfficiency();
}