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


Java EnumToolMaterial類代碼示例

本文整理匯總了Java中net.minecraft.item.EnumToolMaterial的典型用法代碼示例。如果您正苦於以下問題:Java EnumToolMaterial類的具體用法?Java EnumToolMaterial怎麽用?Java EnumToolMaterial使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


EnumToolMaterial類屬於net.minecraft.item包,在下文中一共展示了EnumToolMaterial類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getGravity

import net.minecraft.item.EnumToolMaterial; //導入依賴的package包/類
private float getGravity() 
   {
   	float gravity = 0.05F;
   	if(type != null)
   	{
   		if(type.material == ToolMaterialMedieval.MITHRIL)
   		{
   			gravity *= 0.5F;
   		}
   		else if(type.material == EnumToolMaterial.WOOD)
   		{
   			gravity *= 0.75F;
   		}
   		
   		if(type.arrowType == 1)
   		{
   			gravity *= 0.5F;
   		}
   		else if(type.arrowType == 2)
   		{
   			gravity *= 1.5F;
   		}
   	}
   	
   	return gravity;
}
 
開發者ID:TheAwesomeGem,項目名稱:MineFantasy,代碼行數:27,代碼來源:EntityArrowMF.java

示例2: BoltType

import net.minecraft.item.EnumToolMaterial; //導入依賴的package包/類
private BoltType(String tex, EnumToolMaterial mat, int sub, int i)
{
	int dura = 1;
	if(mat.getMaxUses() < 0)
	{
		dura = -1;
	}
	else
	{
		dura = mat.getMaxUses() / 100;
	}
	index = i;
	matName = tex;
	durability = dura;
	meta = sub;
	material = mat;
}
 
開發者ID:TheAwesomeGem,項目名稱:MineFantasy,代碼行數:18,代碼來源:BoltType.java

示例3: ItemShield

import net.minecraft.item.EnumToolMaterial; //導入依賴的package包/類
public ItemShield(int id, EnumToolMaterial mat, EnumShieldDesign shield) 
{
    super(id);
    this.setCreativeTab(ItemListMF.tabArmour);
    material = mat;
    design = shield;

    this.setUnlocalizedName("shield."+design.getTitle()+"."+getMatName());
    this.setTextureName("minefantasy:Shield/"+design.getTitle()+"/"+design.getTitle()+"."+getMatName());

    this.getShareTag();

    this.setMaxDamage((int)(material.getMaxUses() * shield.getThreshold()) / 2);
    this.setMaxStackSize(1);
    this.setHasSubtypes(false);
    GameRegistry.registerItem(this, this.getUnlocalizedName());
}
 
開發者ID:TheAwesomeGem,項目名稱:MineFantasy,代碼行數:18,代碼來源:ItemShield.java

示例4: ItemChisel

import net.minecraft.item.EnumToolMaterial; //導入依賴的package包/類
public ItemChisel(int id, CarvingRegistry c) {
    super(id, 1, EnumToolMaterial.IRON, CarvableHelper.chiselBlocks.toArray(new Block[CarvableHelper.chiselBlocks.size()]));

    maxStackSize = 1;
    if (Chisel.hardMode) {
        setMaxDamage(500);
        efficiencyOnProperMaterial = 1f;
    } else {
        setMaxDamage(-1);
        efficiencyOnProperMaterial = 100f;
    }


    carvingRegistry = c;
    MinecraftForge.setToolClass(this, "chisel", 1);
    ItemChisel.chisels.add(id + 256);
}
 
開發者ID:delta534,項目名稱:Chisel,代碼行數:18,代碼來源:ItemChisel.java

示例5: postInitHammers

import net.minecraft.item.EnumToolMaterial; //導入依賴的package包/類
public static void postInitHammers() {
	for (AliquoHammer hammer : AliquoHammer.registeredHammers()) {
		AliquoMaterial am = AliquoMaterial.get(hammer.material);
		
		EnumToolMaterial toolEnum = am.getToolEnumFromRecipe();
		if (toolEnum != null)
			GameRegistry.addRecipe(new ShapedOreRecipe(
					hammer,
					hammershape,
					's', "stickWood",
					'i', hammer.getIngotName()));
		else
			toolEnum = am.getFallbackToolEnum();
		
		hammer.setToolMaterial(toolEnum);
	}
}
 
開發者ID:Psioptic,項目名稱:Ex-AliquoRedux,代碼行數:18,代碼來源:Registries.java

示例6: GGPPaxel

import net.minecraft.item.EnumToolMaterial; //導入依賴的package包/類
protected GGPPaxel(int par1, float par2,
		EnumToolMaterial par3EnumToolMaterial, Block[] par4ArrayOfBlock) {
	super(par1, par3EnumToolMaterial);
	this.setTextureName("piggalot:pigtite_paxel");
	this.blocksEffectiveAgainst = par4ArrayOfBlock;
	this.setUnlocalizedName("ITEM_PIGTITE_MULTI");
	this.setCreativeTab(Piggalot.piggalottab);
	
}
 
開發者ID:mixerrules,項目名稱:piggalot-mod,代碼行數:10,代碼來源:GGPPaxel.java

示例7: getMaterial

import net.minecraft.item.EnumToolMaterial; //導入依賴的package包/類
private EnumToolMaterial getMaterial() 
{
	if(getSpear().getItem() instanceof ItemSpearMF)
	{
		return ((ItemSpearMF)getSpear().getItem()).getMaterial();
	}
	return EnumToolMaterial.STONE;
}
 
開發者ID:TheAwesomeGem,項目名稱:MineFantasy,代碼行數:9,代碼來源:EntityThrownSpear.java

示例8: ItemTongs

import net.minecraft.item.EnumToolMaterial; //導入依賴的package包/類
public ItemTongs(int id, EnumToolMaterial mat) 
{
	super(id);
	material = mat;
	this.setFull3D();
	setMaxDamage(mat.getMaxUses());
	this.setMaxStackSize(1);
}
 
開發者ID:TheAwesomeGem,項目名稱:MineFantasy,代碼行數:9,代碼來源:ItemTongs.java

示例9: ItemMallet

import net.minecraft.item.EnumToolMaterial; //導入依賴的package包/類
public ItemMallet(int i, EnumToolMaterial mat) {
	super(i, mat.getEfficiencyOnProperMaterial(), mat, new Block[]{});
	this.material = mat;
	this.setMaxStackSize(1);
       this.setMaxDamage(mat.getMaxUses()*4);
       this.setCreativeTab(ItemListMF.tabTool);
       maxStackSize = 1;
}
 
開發者ID:TheAwesomeGem,項目名稱:MineFantasy,代碼行數:9,代碼來源:ItemMallet.java

示例10: ItemSaw

import net.minecraft.item.EnumToolMaterial; //導入依賴的package包/類
public ItemSaw(int id, EnumToolMaterial material)
{
    super(id, material);
    toolMaterial = material;
    this.efficiencyOnProperMaterial  = material.getEfficiencyOnProperMaterial()*2;
    setMaxDamage(material.getMaxUses()/2);
    this.damageVsEntity = 0 + material.getDamageVsEntity();
}
 
開發者ID:TheAwesomeGem,項目名稱:MineFantasy,代碼行數:9,代碼來源:ItemSaw.java

示例11: ItemScytheMF

import net.minecraft.item.EnumToolMaterial; //導入依賴的package包/類
public ItemScytheMF(int id, EnumToolMaterial material)
{
    super(id);
    toolMaterial = material;
    setMaxDamage(material.getMaxUses());
    this.damageVsEntity = 3F + material.getDamageVsEntity();
}
 
開發者ID:TheAwesomeGem,項目名稱:MineFantasy,代碼行數:8,代碼來源:ItemScytheMF.java

示例12: ItemMedievalHoe

import net.minecraft.item.EnumToolMaterial; //導入依賴的package包/類
public ItemMedievalHoe(int id, EnumToolMaterial material)
{
    super(id, material);
    toolMaterial = material;
    setMaxDamage(material.getMaxUses());
    setCreativeTab(ItemListMF.tabTool);
}
 
開發者ID:TheAwesomeGem,項目名稱:MineFantasy,代碼行數:8,代碼來源:ItemMedievalHoe.java

示例13: ItemSword

import net.minecraft.item.EnumToolMaterial; //導入依賴的package包/類
public ItemSword(int p_i1912_1_, EnumToolMaterial p_i1912_2_) {
   super(p_i1912_1_);
   this.field_77826_b = p_i1912_2_;
   this.field_77777_bU = 1;
   this.func_77656_e(p_i1912_2_.func_77997_a());
   this.func_77637_a(CreativeTabs.field_78037_j);
   this.field_77827_a = 4.0F + p_i1912_2_.func_78000_c();
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:9,代碼來源:ItemSword.java

示例14: ItemShearsMF

import net.minecraft.item.EnumToolMaterial; //導入依賴的package包/類
public ItemShearsMF(int id, EnumToolMaterial material) {
	super(id);
	this.setFull3D();
	setMaxDamage(material.getMaxUses());
	quality = material.getEfficiencyOnProperMaterial();
	this.material = material;
}
 
開發者ID:TheAwesomeGem,項目名稱:MineFantasy,代碼行數:8,代碼來源:ItemShearsMF.java

示例15: ItemTool

import net.minecraft.item.EnumToolMaterial; //導入依賴的package包/類
protected ItemTool(int p_i1854_1_, float p_i1854_2_, EnumToolMaterial p_i1854_3_, Block[] p_i1854_4_) {
   super(p_i1854_1_);
   this.field_77862_b = p_i1854_3_;
   this.field_77863_c = p_i1854_4_;
   this.field_77777_bU = 1;
   this.func_77656_e(p_i1854_3_.func_77997_a());
   this.field_77864_a = p_i1854_3_.func_77998_b();
   this.field_77865_bY = p_i1854_2_ + p_i1854_3_.func_78000_c();
   this.func_77637_a(CreativeTabs.field_78040_i);
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:11,代碼來源:ItemTool.java


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