/** code generated by Tavitoes */
package net.minecraft.src;
public class ItemCrossBow extends Item
{
public ItemCrossBow(int par1)
{
super(par1);
this.maxStackSize = 1;
this.setMaxDamage(400);
this.setTabToDisplayOn(CreativeTabs.tabCombat);
}
public void onPlayerStoppedUsing(ItemStack par1ItemStack, World world, EntityPlayer entityPlayer, int par4)
{
boolean var5 = entityPlayer.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, par1ItemStack) > 0;
if (var5 || entityPlayer.inventory.hasItem(Item.arrow.shiftedIndex))
{
int var6 = this.getMaxItemUseDuration(par1ItemStack) - par4;
float var7 = (float)var6 / 20.0F;
var7 = (var7 * var7 + var7 * 2.0F) / 3.0F;
if ((double)var7 < 1.0D)
{
return;
}
if (var7 > 1.0F)
{
var7 = 1.0F;
}
EntityArrow var8 = new EntityArrow(world, entityPlayer, var7 * 2.0F);
if (var7 == 1.0F)
{
var8.func_70243_d(true);
}
int var10 = EnchantmentHelper.getEnchantmentLevel(Enchantment.punch.effectId, par1ItemStack);
if (var10 > 0)
{
var8.setKnockbackStrength(var10);
}
if (EnchantmentHelper.getEnchantmentLevel(Enchantment.flame.effectId, par1ItemStack) > 0)
{
var8.setFire(100);
}
par1ItemStack.damageItem(1, entityPlayer);
world.playSoundAtEntity(entityPlayer, "random.bow", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + var7 * 0.5F);
if (var5)
{
var8.canBePickedUp = 2;
}
else
{
entityPlayer.inventory.consumeInventoryItem(Item.arrow.shiftedIndex);
}
if (!world.isRemote)
{
world.spawnEntityInWorld(var8);
}
}
}
public ItemStack onFoodEaten(ItemStack itemstack, World world, EntityPlayer entityPlayer)
{
return itemstack;
}
public int getMaxItemUseDuration(ItemStack par1ItemStack)
{
return 725000;
}
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityPlayer)
{
if (entityPlayer.capabilities.isCreativeMode || entityPlayer.inventory.hasItem(Item.arrow.shiftedIndex))
{
entityPlayer.setItemInUse(itemstack, this.getMaxItemUseDuration(itemstack));
}
return itemstack;
}
public int getItemEnchantability()
{
return 1;
}
}
Additional info for CrossBow:
/** code generated by Tavitoes */
package net.minecraft.src;
import java.util.*;
public class mod_CrossBow extends BaseModMp
{
public static final Item CrossBow = new ItemCrossBow(18654); public void load()
{
CrossBow.setIconIndex(ModLoader.addOverride("/gui/items.png", "/CrossBow.png"));
ModLoader.addName(CrossBow, "Crossbow");
}
public String getVersion()
{
return "code generated by Tavitoes";
}
}
Recipe for CrossBow:
/** code generated by Tavitoes */
package net.minecraft.src;
public class mod_CrossBowRecipe extends BaseModMp
{
public void load()
{
ModLoader.addRecipe(new ItemStack(Item.CrossBow, 1), new Object []{ "!@#", "$%^", "&*X", Character.valueOf('!'), Item.air, Character.valueOf('@'), Item.stick, Character.valueOf('#'), Item.air, Character.valueOf('$'), Item.air, Character.valueOf('%'), Item.bow, Character.valueOf('^'), Item.stick, Character.valueOf('&'), Item.air, Character.valueOf('*'), Item.stick, Character.valueOf('X'), Item.air});
}
public String getVersion()
{
return "code generated by Tavitoes";
}
}
It's good that your making this mod.Ive been finding for a mod like this before but none.The cool thing in this mod is that this mod has medival furnature and sheilds.
hope you release this mod in 3 weeks
i just read this, and WOAH. this is an amazing mod. i could use this and make an adventure map of it (though i probably won't for a while, i'm a bit preoccupied with my mod, the super blocks mod: minecraftforum.net/topic/1743719-super-blocks/) when's the download going to be out? i really want to try this out.
Rollback Post to RevisionRollBack
/\ A bit dead right now, support would be greatly appreciated /\
Also the link is broken, click the one below. I will fix this soon.
PureSurf Is Back ! Sorry For The Inactivity Recently Guys I Had A Science Exam And I Really Needed To Study :3 But Im Back And The Mod Development Is Going Faster Than Ever ! Im Planning On A Pre-Release Just To Give You Guys A Taste Of What The Mod Will Be Like So Keep Up To Date With The Updates To The Post ! Also If You Could Support In Anyway Such As Using The Banner Or Up-ing The Post That Would Be Awesome !
And so guys? Have you choose already what kind of weapon will you use? Sword, Shorsword, Longsword, Great Blade, Trident, Spear, Scythe or Great Axe? And don't forget Shields!
no sig yay
CrossBow:
Additional info for CrossBow:
Recipe for CrossBow:
By the way, this is post 96! Who will get the 100th post?
no sig yay
hope you release this mod in 3 weeks
Is there a prize if i be the 100th post
I am now the 100th post!!!
ok maybe you could add some of those things I suggested later after the mod has come out
-Thanks xPureSurfx
no sig yay
no sig yay
no sig yay
no sig yay
no sig yay
Whoohoo! Those are great news!
no sig yay
Yup, I'm an Age Craft dev, check out the mod!
And as do we! We're working hard to make this mod so everyone can enjoy!
no sig yay