本文整理汇总了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);
}