当前位置: 首页>>代码示例>>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;未经允许,请勿转载。