本文整理匯總了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;
}
示例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;
}
示例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());
}
示例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);
}
示例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);
}
}
示例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);
}
示例7: getMaterial
import net.minecraft.item.EnumToolMaterial; //導入依賴的package包/類
private EnumToolMaterial getMaterial()
{
if(getSpear().getItem() instanceof ItemSpearMF)
{
return ((ItemSpearMF)getSpear().getItem()).getMaterial();
}
return EnumToolMaterial.STONE;
}
示例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);
}
示例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;
}
示例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();
}
示例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();
}
示例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);
}
示例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();
}
示例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;
}
示例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);
}