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; }
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; }
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()); }
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); }
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); } }
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); }
private EnumToolMaterial getMaterial() { if(getSpear().getItem() instanceof ItemSpearMF) { return ((ItemSpearMF)getSpear().getItem()).getMaterial(); } return EnumToolMaterial.STONE; }
public ItemTongs(int id, EnumToolMaterial mat) { super(id); material = mat; this.setFull3D(); setMaxDamage(mat.getMaxUses()); this.setMaxStackSize(1); }
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; }
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(); }
public ItemScytheMF(int id, EnumToolMaterial material) { super(id); toolMaterial = material; setMaxDamage(material.getMaxUses()); this.damageVsEntity = 3F + material.getDamageVsEntity(); }
public ItemMedievalHoe(int id, EnumToolMaterial material) { super(id, material); toolMaterial = material; setMaxDamage(material.getMaxUses()); setCreativeTab(ItemListMF.tabTool); }
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(); }
public ItemShearsMF(int id, EnumToolMaterial material) { super(id); this.setFull3D(); setMaxDamage(material.getMaxUses()); quality = material.getEfficiencyOnProperMaterial(); this.material = material; }
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); }
public ItemMedievalSpade(int id, EnumToolMaterial material) { super(id, material); MinecraftForge.setToolClass(this, "shovel", material.getHarvestLevel()); setCreativeTab(ItemListMF.tabTool); this.damageVsEntity = material.getDamageVsEntity()+2; }
public ItemNileHoe(int par1, EnumToolMaterial nileEssenceMaterial) { super(par1); this.nileEssenceMaterial = nileEssenceMaterial; this.maxStackSize = 1; this.setMaxDamage(nileEssenceMaterial.getMaxUses()); this.setCreativeTab(ZeroQuest.ZeroTab); }
public ItemNeedle(int id, EnumToolMaterial material) { super(id); setMaxStackSize(1); setCreativeTab(ItemListMF.tabTailor); setMaxDamage(material.getMaxUses()*4); efficiency = material.getEfficiencyOnProperMaterial(); tier = material.getHarvestLevel(); }
/** an array of the blocks this pickaxe is effective against */ public ItemHandpick(int id, EnumToolMaterial material) { super(id, material); MinecraftForge.setToolClass(this, "pickaxe", material.getHarvestLevel()); setCreativeTab(ItemListMF.tabTool); this.setMaxDamage((int) (material.getMaxUses() * 0.5F) ); this.efficiencyOnProperMaterial = material.getEfficiencyOnProperMaterial() * 0.5F; }
public ItemKnifeMF(int id, float dam, EnumToolMaterial material) { super(id, material.getEfficiencyOnProperMaterial(), material, new Block[]{}); quality = material.getEfficiencyOnProperMaterial(); damageVsEntity = dam; setCreativeTab(ItemListMF.tabTool); }
public ItemMattock(int id, EnumToolMaterial material) { super(id); toolMaterial = material; setMaxDamage(material.getMaxUses()*2); this.efficiencyOnProperMaterial = material.getEfficiencyOnProperMaterial()*0.5F; MinecraftForge.setToolClass(this, "pickaxe", material.getHarvestLevel()); }
public ItemHoe(int p_i1873_1_, EnumToolMaterial p_i1873_2_) { super(p_i1873_1_); this.field_77843_a = p_i1873_2_; this.field_77777_bU = 1; this.func_77656_e(p_i1873_2_.func_77997_a()); this.func_77637_a(CreativeTabs.field_78040_i); }
public ItemHoundWeaponMF(int id, EnumToolMaterial material, String tex, int str, int dam) { super(id, material); texture = tex; strength = str; this.setCreativeTab(ItemListMF.tabPets); weaponDamage = dam; }
private BoltType(String tex, EnumToolMaterial mat, int dura, int sub, int i) { index = i; matName = tex; durability = dura; meta = sub; material = mat; }
public ItemShield(int id, EnumToolMaterial mat, EnumShieldDesign shield, String name) { this(id, mat, shield); customname = name; this.setUnlocalizedName("shield."+design.getTitle()+"."+name); this.setTextureName("minefantasy:Shield/"+design.getTitle()+"/"+design.getTitle()+"."+name); }
public ItemWarpick(int id, EnumToolMaterial material) { super(id, material); DecimalFormat decimal_format = new DecimalFormat("#.#"); APdamage = baseDamage*getAPPercent(); if(!(this instanceof ItemWarhammer)) { this.efficiencyOnProperMaterial = material.getEfficiencyOnProperMaterial()*0.75F; MinecraftForge.setToolClass(this, "pickaxe", material.getHarvestLevel()); } }
public ItemWeaponMF(int id, EnumToolMaterial material) { super(id, material); setCreativeTab(ItemListMF.tabWeapon); this.material = material; setMaxDamage((int)(material.getMaxUses() * getDurability())); this.baseDamage = (4 + material.getDamageVsEntity())* this.getDamageModifier(); }
public AliquoHammer(int id, String material) { super(id, EnumToolMaterial.WOOD); this.material = material; setUnlocalizedName("ExAliquo." + LOWER_CAMEL.to(UPPER_CAMEL, material) + "Hammer"); setCreativeTab(Registries.exatab); }
/** * Listed top to bottom on priority * Mat Name, Material, Type, Metadata */ private void addBolts() { BoltType.addBolt("Ignotumite", ToolMaterialMedieval.IGNOTUMITE, 8); BoltType.addBolt("DeepIron", ToolMaterialMedieval.DEEP_IRON, 9); BoltType.addBolt("Dragon", ToolMaterialMedieval.DRAGONFORGE, 7); BoltType.addBolt("Encrusted", ToolMaterialMedieval.ENCRUSTED, 6); BoltType.addBolt("Silver", ToolMaterialMedieval.ORNATE, 5); BoltType.addBolt("Mithril", ToolMaterialMedieval.MITHRIL, 4); BoltType.addBolt("Steel", ToolMaterialMedieval.STEEL, 3); BoltType.addBolt("Iron", ToolMaterialMedieval.IRON, 2); BoltType.addBolt("Bronze", ToolMaterialMedieval.BRONZE, 1); BoltType.addBolt("Flint", EnumToolMaterial.WOOD, 2, 0); }
private ArrowType(String tex, EnumToolMaterial mat, int dura, int type, int sub, int i) { index = i; matName = tex; meta = sub; material = mat; durability = dura; arrowType = type; }
public ItemDarkHoe(int par1, EnumToolMaterial darkEssenceMaterial) { super(par1); this.darkEssenceMaterial = darkEssenceMaterial; this.maxStackSize = 1; this.setMaxDamage(darkEssenceMaterial.getMaxUses()); this.setCreativeTab(ZeroQuest.ZeroTab); }
private boolean use(TileEntityTanningRack tile, EntityPlayer player) { ItemStack held = player.getHeldItem(); ItemStack hung = tile.getHung(); EnumToolType tool = null; float efficiency = 1.0F; if(held != null && hung != null) { if(held.getItem() instanceof ItemShears) { tool = EnumToolType.CUTTER; efficiency = EnumToolMaterial.IRON.getEfficiencyOnProperMaterial(); } if(held.getItem() instanceof ITanningItem) { tool = ((ITanningItem)held.getItem()).getType(); efficiency = ((ITanningItem)held.getItem()).getQuality(); } if(tool != null) { tile.use(player, tool, efficiency); return true; } } return false; }
public AirStaff(int par1, EnumToolMaterial material) { super(par1, material); this.maxStackSize = 1; this.setMaxDamage(400); this.setFull3D(); this.setCreativeTab(RunesAndSilver.tabRunesMod); this.damageVsEntity = 4.00F; this.setUnlocalizedName("AirStaff"); }
public FireStaff(int par1, EnumToolMaterial material) { super(par1, material); this.maxStackSize = 1; this.setMaxDamage(400); this.setFull3D(); this.setCreativeTab(RunesAndSilver.tabRunesMod); this.damageVsEntity = 4.00F; this.setUnlocalizedName("FireStaff"); }
public ItemNileSword(int par1, EnumToolMaterial par2EnumToolMaterial) { super(par1); this.nileEssenceMaterial = par2EnumToolMaterial; this.maxStackSize = 1; this.setMaxDamage(par2EnumToolMaterial.getMaxUses()); this.setCreativeTab(ZeroQuest.ZeroTab); this.weaponDamage = 5.0F + par2EnumToolMaterial.getDamageVsEntity(); }
public EarthStaff(int par1, EnumToolMaterial par2EnumToolMaterial){ super(par1, 1.0F, par2EnumToolMaterial, blocksEffectiveAgainst); this.setMaxStackSize(1); this.setMaxDamage(100); this.setCreativeTab(RunesAndSilver.tabRunesMod); this.setUnlocalizedName("EarthStaff"); }
public WaterSword(int ItemID, EnumToolMaterial material){ super(ItemID, material); this.setCreativeTab(RunesAndSilver.tabRunesMod); this.toolMaterial = material; this.weaponDamage = 4.0F + material.getDamageVsEntity(); this.setUnlocalizedName("WaterSword"); }
public void setToolMaterial(EnumToolMaterial stat) { toolMaterial = stat; setMaxDamage(stat.getMaxUses()); efficiencyOnProperMaterial = stat.getEfficiencyOnProperMaterial(); damageVsEntity = 3 + stat.getDamageVsEntity(); }
public IceSword(int ItemID, EnumToolMaterial material, String textureName) { super(ItemID, material); this.setUnlocalizedName(textureName); texturePath += textureName; }
public IcePickaxe(int ItemID, EnumToolMaterial material, String textureName) { super(ItemID, material); this.setUnlocalizedName(textureName); texturePath += textureName; }