當前位置: 首頁>>代碼示例>>Java>>正文


Java Material.sand方法代碼示例

本文整理匯總了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;
}
 
開發者ID:Domochevsky,項目名稱:minecraft-quiverbow,代碼行數:21,代碼來源:Helper.java

示例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);
    }
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:31,代碼來源:TileEntityNote.java

示例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);
}
 
開發者ID:jm-organization,項目名稱:connor41-etfuturum2,代碼行數:12,代碼來源:BlockConcrete.java

示例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);
}
 
開發者ID:jm-organization,項目名稱:connor41-etfuturum2,代碼行數:12,代碼來源:BlockConcretePowder.java

示例5: BlockSoulSand

import net.minecraft.block.material.Material; //導入方法依賴的package包/類
public BlockSoulSand()
{
    super(Material.sand, MapColor.brownColor);
    this.setCreativeTab(CreativeTabs.tabBlock);
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:6,代碼來源:BlockSoulSand.java

示例6: BlockFalling

import net.minecraft.block.material.Material; //導入方法依賴的package包/類
public BlockFalling()
{
    super(Material.sand);
    this.setCreativeTab(CreativeTabs.tabBlock);
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:6,代碼來源:BlockFalling.java

示例7: BlockSoulSand

import net.minecraft.block.material.Material; //導入方法依賴的package包/類
public BlockSoulSand() {
	super(Material.sand, MapColor.brownColor);
	this.setCreativeTab(CreativeTabs.tabBlock);
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:5,代碼來源:BlockSoulSand.java


注:本文中的net.minecraft.block.material.Material.sand方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。