本文整理汇总了Java中net.minecraft.block.material.Material.sand方法的典型用法代码示例。如果您正苦于以下问题:Java Material.sand方法的具体用法?Java Material.sand怎么用?Java Material.sand使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.block.material.Material
的用法示例。
在下文中一共展示了Material.sand方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: hasValidMaterial
import net.minecraft.block.material.Material; //导入方法依赖的package包/类
public static boolean hasValidMaterial(World world, int x, int y, int z)
{
Block block = world.getBlock(x, y, z);
// Is the attached block a valid material?
if (block.getMaterial() == Material.clay) { return true; }
else if (block.getMaterial() == Material.cloth) { return true; }
else if (block.getMaterial() == Material.grass) { return true; }
else if (block.getMaterial() == Material.ground) { return true; }
else if (block.getMaterial() == Material.iron) { return true; }
else if (block.getMaterial() == Material.piston) { return true; }
else if (block.getMaterial() == Material.rock) { return true; }
else if (block.getMaterial() == Material.sand) { return true; }
else if (block.getMaterial() == Material.wood) { return true; }
else if (block.getMaterial() == Material.craftedSnow) { return true; }
else if (block.getMaterial() == Material.leaves) { return true; }
// No?
return false;
}
示例2: triggerNote
import net.minecraft.block.material.Material; //导入方法依赖的package包/类
public void triggerNote(World worldIn, BlockPos p_175108_2_)
{
if (worldIn.getBlockState(p_175108_2_.up()).getBlock().getMaterial() == Material.air)
{
Material material = worldIn.getBlockState(p_175108_2_.down()).getBlock().getMaterial();
int i = 0;
if (material == Material.rock)
{
i = 1;
}
if (material == Material.sand)
{
i = 2;
}
if (material == Material.glass)
{
i = 3;
}
if (material == Material.wood)
{
i = 4;
}
worldIn.addBlockEvent(p_175108_2_, Blocks.noteblock, i, this.note);
}
}
示例3: BlockConcrete
import net.minecraft.block.material.Material; //导入方法依赖的package包/类
public BlockConcrete(int meta) {
super(Material.sand);
String color = colors[meta];
setHardness(1.8F);
setResistance(9.0F);
setHarvestLevel("pickaxe", 0);
setBlockTextureName("concrete_" + color);
setStepSound(soundTypePiston);
setBlockName(Utils.getUnlocalisedName(color+"_block_concrete"));
setCreativeTab(EtFuturum.enableBlockConcrete ? EtFuturum.creativeTab : null);
}
示例4: BlockConcretePowder
import net.minecraft.block.material.Material; //导入方法依赖的package包/类
public BlockConcretePowder(int meta) {
super(Material.sand);
String color = colors[meta];
setHardness(0.5F);
setResistance(2.5F);
setHarvestLevel("shovel", 0);
setBlockTextureName("concrete_powder_" + color);
setStepSound(soundTypeSand);
setBlockName(Utils.getUnlocalisedName(color+"_block_concrete_powder"));
setCreativeTab(EtFuturum.enableBlockConcretePowder ? EtFuturum.creativeTab : null);
}
示例5: BlockSoulSand
import net.minecraft.block.material.Material; //导入方法依赖的package包/类
public BlockSoulSand()
{
super(Material.sand, MapColor.brownColor);
this.setCreativeTab(CreativeTabs.tabBlock);
}
示例6: BlockFalling
import net.minecraft.block.material.Material; //导入方法依赖的package包/类
public BlockFalling()
{
super(Material.sand);
this.setCreativeTab(CreativeTabs.tabBlock);
}
示例7: BlockSoulSand
import net.minecraft.block.material.Material; //导入方法依赖的package包/类
public BlockSoulSand() {
super(Material.sand, MapColor.brownColor);
this.setCreativeTab(CreativeTabs.tabBlock);
}