本文整理匯總了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);
}
示例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: 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);
}
示例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);
}
示例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");
}
示例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);
}
示例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);
}
示例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)))))));
}
}
示例9: BlockNote
import net.minecraft.block.material.Material; //導入方法依賴的package包/類
public BlockNote()
{
super(Material.wood);
this.setCreativeTab(CreativeTabs.tabRedstone);
}
示例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;
}
示例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;
}
示例12: BlockBookshelf
import net.minecraft.block.material.Material; //導入方法依賴的package包/類
public BlockBookshelf()
{
super(Material.wood);
this.setCreativeTab(CreativeTabs.tabBlock);
}
示例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);
}
示例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;
}
示例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);
}