当前位置: 首页>>代码示例>>Java>>正文


Java Material.wood方法代码示例

本文整理汇总了Java中net.minecraft.block.material.Material.wood方法的典型用法代码示例。如果您正苦于以下问题:Java Material.wood方法的具体用法?Java Material.wood怎么用?Java Material.wood使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.block.material.Material的用法示例。


在下文中一共展示了Material.wood方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: BlockSign

import net.minecraft.block.material.Material; //导入方法依赖的package包/类
protected BlockSign()
{
    super(Material.wood);
    float f = 0.25F;
    float f1 = 1.0F;
    this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f1, 0.5F + f);
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:8,代码来源:BlockSign.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:SkidJava,项目名称:BaseClient,代码行数:31,代码来源:TileEntityNote.java

示例3: NetherWartBlock

import net.minecraft.block.material.Material; //导入方法依赖的package包/类
public NetherWartBlock() {
	super(Material.wood);
	setBlockName(Utils.getUnlocalisedName("nether_wart_block"));
	setHardness(1F);
	setResistance(1.5F);
	setBlockTextureName("nether_wart_block");
	setStepSound(soundTypeWood);
	setLightOpacity(0);
	setCreativeTab(EtFuturum.enableNetherWartBlock? EtFuturum.creativeTab : null);
}
 
开发者ID:jm-organization,项目名称:connor41-etfuturum2,代码行数:11,代码来源:NetherWartBlock.java

示例4: BlockLog

import net.minecraft.block.material.Material; //导入方法依赖的package包/类
public BlockLog()
{
    super(Material.wood);
    this.setCreativeTab(CreativeTabs.tabBlock);
    this.setHardness(2.0F);
    this.setStepSound(soundTypeWood);
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:8,代码来源:BlockLog.java

示例5: BlockDaylightDetector

import net.minecraft.block.material.Material; //导入方法依赖的package包/类
public BlockDaylightDetector(boolean inverted)
{
    super(Material.wood);
    this.inverted = inverted;
    this.setDefaultState(this.blockState.getBaseState().withProperty(POWER, Integer.valueOf(0)));
    this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.375F, 1.0F);
    this.setCreativeTab(CreativeTabs.tabRedstone);
    this.setHardness(0.2F);
    this.setStepSound(soundTypeWood);
    this.setUnlocalizedName("daylightDetector");
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:12,代码来源:BlockDaylightDetector.java

示例6: BlockBanner

import net.minecraft.block.material.Material; //导入方法依赖的package包/类
protected BlockBanner()
{
    super(Material.wood);
    float f = 0.25F;
    float f1 = 1.0F;
    this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f1, 0.5F + f);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:8,代码来源:BlockBanner.java

示例7: BlockBanner

import net.minecraft.block.material.Material; //导入方法依赖的package包/类
public BlockBanner() {
	super(Material.wood);
	disableStats();
	setHardness(1.0F);
	setStepSound(soundTypeWood);
	setBlockName(Utils.getUnlocalisedName("banner"));
	setCreativeTab(EtFuturum.enableBanners ? EtFuturum.creativeTab : null);

	float f = 0.25F;
	float f1 = 1.0F;
	setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f1, 0.5F + f);
}
 
开发者ID:jm-organization,项目名称:connor41-etfuturum2,代码行数:13,代码来源:BlockBanner.java

示例8: getItemBurnTime

import net.minecraft.block.material.Material; //导入方法依赖的package包/类
/**
 * Returns the number of ticks that the supplied fuel item will keep the furnace burning, or 0 if the item isn't
 * fuel
 */
public static int getItemBurnTime(ItemStack p_145952_0_)
{
    if (p_145952_0_ == null)
    {
        return 0;
    }
    else
    {
        Item item = p_145952_0_.getItem();

        if (item instanceof ItemBlock && Block.getBlockFromItem(item) != Blocks.air)
        {
            Block block = Block.getBlockFromItem(item);

            if (block == Blocks.wooden_slab)
            {
                return 150;
            }

            if (block.getMaterial() == Material.wood)
            {
                return 300;
            }

            if (block == Blocks.coal_block)
            {
                return 16000;
            }
        }

        return item instanceof ItemTool && ((ItemTool)item).getToolMaterialName().equals("WOOD") ? 200 : (item instanceof ItemSword && ((ItemSword)item).getToolMaterialName().equals("WOOD") ? 200 : (item instanceof ItemHoe && ((ItemHoe)item).getMaterialName().equals("WOOD") ? 200 : (item == Items.stick ? 100 : (item == Items.coal ? 1600 : (item == Items.lava_bucket ? 20000 : (item == Item.getItemFromBlock(Blocks.sapling) ? 100 : (item == Items.blaze_rod ? 2400 : 0)))))));
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:38,代码来源:TileEntityFurnace.java

示例9: BlockNote

import net.minecraft.block.material.Material; //导入方法依赖的package包/类
public BlockNote()
{
    super(Material.wood);
    this.setCreativeTab(CreativeTabs.tabRedstone);
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:6,代码来源:BlockNote.java

示例10: getStrVsBlock

import net.minecraft.block.material.Material; //导入方法依赖的package包/类
public float getStrVsBlock(ItemStack stack, Block block)
{
    return block.getMaterial() != Material.wood && block.getMaterial() != Material.plants && block.getMaterial() != Material.vine ? super.getStrVsBlock(stack, block) : this.efficiencyOnProperMaterial;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:5,代码来源:ItemAxe.java

示例11: getBlockDoor

import net.minecraft.block.material.Material; //导入方法依赖的package包/类
private BlockDoor getBlockDoor(BlockPos pos)
{
    Block block = this.theEntity.worldObj.getBlockState(pos).getBlock();
    return block instanceof BlockDoor && block.getMaterial() == Material.wood ? (BlockDoor)block : null;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:6,代码来源:EntityAIDoorInteract.java

示例12: BlockBookshelf

import net.minecraft.block.material.Material; //导入方法依赖的package包/类
public BlockBookshelf()
{
    super(Material.wood);
    this.setCreativeTab(CreativeTabs.tabBlock);
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:6,代码来源:BlockBookshelf.java

示例13: BlockPlanks

import net.minecraft.block.material.Material; //导入方法依赖的package包/类
public BlockPlanks()
{
    super(Material.wood);
    this.setDefaultState(this.blockState.getBaseState().withProperty(VARIANT, BlockPlanks.EnumType.OAK));
    this.setCreativeTab(CreativeTabs.tabBlock);
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:7,代码来源:BlockPlanks.java

示例14: isWoodDoor

import net.minecraft.block.material.Material; //导入方法依赖的package包/类
private boolean isWoodDoor(BlockPos doorPos)
{
    Block block = this.worldObj.getBlockState(doorPos).getBlock();
    return block instanceof BlockDoor ? block.getMaterial() == Material.wood : false;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:6,代码来源:VillageCollection.java

示例15: BlockJukebox

import net.minecraft.block.material.Material; //导入方法依赖的package包/类
protected BlockJukebox()
{
    super(Material.wood, MapColor.dirtColor);
    this.setDefaultState(this.blockState.getBaseState().withProperty(HAS_RECORD, Boolean.valueOf(false)));
    this.setCreativeTab(CreativeTabs.tabDecorations);
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:7,代码来源:BlockJukebox.java


注:本文中的net.minecraft.block.material.Material.wood方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。