當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。