本文整理匯總了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);
}