本文整理汇总了Java中net.minecraft.init.Items.FLINT属性的典型用法代码示例。如果您正苦于以下问题:Java Items.FLINT属性的具体用法?Java Items.FLINT怎么用?Java Items.FLINT使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类net.minecraft.init.Items
的用法示例。
在下文中一共展示了Items.FLINT属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getCrushResult
public static ItemStack getCrushResult(Block broken, IBlockState state)
{
if (broken == Blocks.STONE && broken.getMetaFromState(state) == 0)
{
return new ItemStack(Blocks.COBBLESTONE);
}
else if (broken == Blocks.COBBLESTONE)
{
return new ItemStack(Blocks.GRAVEL);
}
else if (broken == Blocks.GRAVEL)
{
return new ItemStack(Items.FLINT, 2);
}
else if (broken == Blocks.SANDSTONE)
{
return new ItemStack(Blocks.SAND);
}
else
{
return null;
}
}
示例2: getItemDropped
/**
* Get the Item that this Block should drop when harvested.
*/
public Item getItemDropped(IBlockState state, Random rand, int fortune)
{
if (fortune > 3)
{
fortune = 3;
}
return rand.nextInt(10 - fortune * 3) == 0 ? Items.FLINT : super.getItemDropped(state, rand, fortune);
}
示例3: getItemDropped
/**
* Get the Item that this Block should drop when harvested.
*/
@Nullable
public Item getItemDropped(IBlockState state, Random rand, int fortune)
{
if (fortune > 3)
{
fortune = 3;
}
return rand.nextInt(10 - fortune * 3) == 0 ? Items.FLINT : Item.getItemFromBlock(this);
}