當前位置: 首頁>>代碼示例>>Java>>正文


Java Material.iron方法代碼示例

本文整理匯總了Java中net.minecraft.block.material.Material.iron方法的典型用法代碼示例。如果您正苦於以下問題:Java Material.iron方法的具體用法?Java Material.iron怎麽用?Java Material.iron使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.block.material.Material的用法示例。


在下文中一共展示了Material.iron方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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: LeadBlock

import net.minecraft.block.material.Material; //導入方法依賴的package包/類
public LeadBlock() {
	
	super(Material.iron);
	setHardness(5F);
	setResistance(30F);
	setHarvestLevel("pickaxe", 2);
	setCreativeTab(GrandBlocks.tabGrandBlocks);
	setStepSound(soundTypeMetal);
	setBlockName("LeadBlock");
	setBlockTextureName("steamstell:lead_block");
	
}
 
開發者ID:grand-mine-inc,項目名稱:Steam-and-Steel,代碼行數:13,代碼來源:LeadBlock.java

示例3: ChromiumBlock

import net.minecraft.block.material.Material; //導入方法依賴的package包/類
public ChromiumBlock() {
	super(Material.iron);
	setCreativeTab(Technical.tabTechnicalBlocks);
	setBlockName("chromiumBlock");
	setBlockTextureName(Technical.modName + ":" + getUnlocalizedName().substring(5));
	setStepSound(soundTypeMetal);
	setHardness(4.5F);
	setResistance(9.5F);
	setHarvestLevel("pickaxe", 1);
}
 
開發者ID:viddeno,項目名稱:Technical,代碼行數:11,代碼來源:ChromiumBlock.java

示例4: BlastFurnaceAdvanced

import net.minecraft.block.material.Material; //導入方法依賴的package包/類
public BlastFurnaceAdvanced(boolean active) {
	super(Type.blastFurnaceAdvanced, Material.iron, active);
	if(active)
		setBlockName("blastFurnaceAdvancedActive");
	else
		setBlockName("blastFurnaceAdvancedIdle");
}
 
開發者ID:viddeno,項目名稱:Technical,代碼行數:8,代碼來源:BlastFurnaceAdvanced.java

示例5: UraniumBlock

import net.minecraft.block.material.Material; //導入方法依賴的package包/類
public UraniumBlock() {
	
	super(Material.iron);
	setHardness(5F);
	setResistance(30F);
	setHarvestLevel("pickaxe", 2);
	setCreativeTab(GrandBlocks.tabGrandBlocks);
	setStepSound(soundTypeMetal);
	setBlockName("UraniumBlock");
	setBlockTextureName("steamstell:uranium_block");
	
}
 
開發者ID:grand-mine-inc,項目名稱:Steam-and-Steel,代碼行數:13,代碼來源:UraniumBlock.java

示例6: BlastFurnaceMedium

import net.minecraft.block.material.Material; //導入方法依賴的package包/類
public BlastFurnaceMedium(boolean active) {
	super(Type.blastFurnaceMedium, Material.iron, active);
	if(active)
		setBlockName("blastFurnaceMediumActive");
	else
		setBlockName("blastFurnaceMediumIdle");
}
 
開發者ID:viddeno,項目名稱:Technical,代碼行數:8,代碼來源:BlastFurnaceMedium.java

示例7: IronBlock

import net.minecraft.block.material.Material; //導入方法依賴的package包/類
public IronBlock() {
	super(Material.iron);
	setCreativeTab(Technical.tabTechnicalBlocks);
	setBlockName("ironBlock");
	setBlockTextureName(Technical.modName + ":" + getUnlocalizedName().substring(5));
	setStepSound(soundTypeMetal);
	setHardness(3.5F);
	setResistance(8.0F);
	setHarvestLevel("pickaxe", 0);
}
 
開發者ID:viddeno,項目名稱:Technical,代碼行數:11,代碼來源:IronBlock.java

示例8: onBlockActivated

import net.minecraft.block.material.Material; //導入方法依賴的package包/類
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)
{
    if (this.blockMaterial == Material.iron)
    {
        return true;
    }
    else
    {
        state = state.cycleProperty(OPEN);
        worldIn.setBlockState(pos, state, 2);
        worldIn.playAuxSFXAtEntity(playerIn, ((Boolean)state.getValue(OPEN)).booleanValue() ? 1003 : 1006, pos, 0);
        return true;
    }
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:15,代碼來源:BlockTrapDoor.java

示例9: BlockHopper

import net.minecraft.block.material.Material; //導入方法依賴的package包/類
public BlockHopper()
{
    super(Material.iron, MapColor.stoneColor);
    this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.DOWN).withProperty(ENABLED, Boolean.valueOf(true)));
    this.setCreativeTab(CreativeTabs.tabRedstone);
    this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:8,代碼來源:BlockHopper.java

示例10: BlockBrewingStand

import net.minecraft.block.material.Material; //導入方法依賴的package包/類
public BlockBrewingStand()
{
    super(Material.iron);
    this.setDefaultState(this.blockState.getBaseState().withProperty(HAS_BOTTLE[0], Boolean.valueOf(false)).withProperty(HAS_BOTTLE[1], Boolean.valueOf(false)).withProperty(HAS_BOTTLE[2], Boolean.valueOf(false)));
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:6,代碼來源:BlockBrewingStand.java

示例11: Centrifuge

import net.minecraft.block.material.Material; //導入方法依賴的package包/類
public Centrifuge(boolean active) {
	super(Type.centrifuge, Material.iron, active);
}
 
開發者ID:viddeno,項目名稱:Technical,代碼行數:4,代碼來源:Centrifuge.java

示例12: HmageFurnaceBlock

import net.minecraft.block.material.Material; //導入方法依賴的package包/類
public HmageFurnaceBlock() {
  super(Material.iron);
}
 
開發者ID:Rires-Magica,項目名稱:HMAGEMOD,代碼行數:4,代碼來源:HmageFurnaceBlock.java

示例13: AutoWorkBench

import net.minecraft.block.material.Material; //導入方法依賴的package包/類
public AutoWorkBench() {
	super(Type.autoWorkBench, Material.iron);
}
 
開發者ID:viddeno,項目名稱:Technical,代碼行數:4,代碼來源:AutoWorkBench.java

示例14: GrabberFast

import net.minecraft.block.material.Material; //導入方法依賴的package包/類
public GrabberFast() {
	super(Material.iron, "grabberFast");
}
 
開發者ID:viddeno,項目名稱:Technical,代碼行數:4,代碼來源:GrabberFast.java

示例15: getStrVsBlock

import net.minecraft.block.material.Material; //導入方法依賴的package包/類
public float getStrVsBlock(ItemStack stack, Block block)
{
    return block.getMaterial() != Material.iron && block.getMaterial() != Material.anvil && block.getMaterial() != Material.rock ? super.getStrVsBlock(stack, block) : this.efficiencyOnProperMaterial;
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:5,代碼來源:ItemPickaxe.java


注:本文中的net.minecraft.block.material.Material.iron方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。