Created code for Dragon Knife and Dragon Ingot. I have no idea how this will integrate into the mod, I just thought it was cool. BTW, I just made a client verison. No server version.
Dragon Knife:
/** code generated by Tavitoes */
package net.minecraft.src;
public class ItemDragonKnife extends Item
{
private int weaponDamage;
private final EnumToolMaterialDragonIngot toolMaterial;
public ItemDragon Knife(int par1, EnumToolMaterialDragonIngot par2Material)
{
super(par1);
this.toolMaterial = par2Material;
this.maxStackSize = 1;
this.setMaxDamage(par2Material.getMaxUses());
this.setTabToDisplayOn(CreativeTabs.tabCombat);
this.weaponDamage = 4 + par2Material.getDamageVsEntity();
}
public float getStrVsBlock(ItemStack itemstack, Block block)
{
return block.blockID == Block.web.blockID ? 15.0F : 1.5F;
}
public boolean hitEntity(ItemStack itemstack, EntityLiving par2EntityLiving, EntityLiving par3EntityLiving)
{
itemstack.damageItem(1, par3EntityLiving);
return true;
}
public boolean onBlockDestroyed(ItemStack par1ItemStack, World par2World, int par3, int par4, int par5, int par6, EntityLiving par7EntityLiving)
{
if ((double)Block.blocksList[par3].getBlockHardness(par2World, par4, par5, par6) != 0.0D)
{
par1ItemStack.damageItem(2, par7EntityLiving);
}
return true;
}
public int getDamageVsEntity(Entity par1Entity)
{
return this.weaponDamage;
}
public boolean isFull3D()
{
return true;
} public EnumAction getItemUseAction(ItemStack itemstack)
{
return EnumAction.block;
}
public int getMaxItemUseDuration(ItemStack par1ItemStack)
{
return 72000;
}
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityPlayer)
{
entityPlayer.setItemInUse(itemstack, this.getMaxItemUseDuration(itemstack)); return itemstack;
}
public boolean cahHarvestBlock(Block block)
{
return block.blockID == Block.web.blockID;
}
public int getItemEnchantability()
{
return this.toolMaterial.getEnchantability();
}
public String func_77825_f()
{
return this.toolMaterial.toString();
}
}
Dragon Ingot:
/** code generated by Tavitoes */
package net.minecraft.src;
public class mod_DragonIngot extends BaseModMp
{
public static final Item DragonIngot = new Item(17665).setIconIndex(ModLoader.addOverride("/gui/items.png", "/DragonIngot.png")).setItemName("DragonIngot");
public void load()
{
ModLoader.addName(DragonIngot, "Dragon Ingot");
}
public String getVersion()
{
return "code generated by Tavitoes";
}
}
Toolset for the Knife:
/** code generated by Tavitoes */
package net.minecraft.src;
public class ItemDragonTools extends Item
{
private Block[] blocksEffectiveAgainst;
protected float efficiencyOnProperMaterial = 4.0F;
private int damageVsEntity;
protected EnumToolMaterialDragonIngot toolMaterial;
protected ItemDragonTools(int par1, int par2, EnumToolMaterialDragonIngot par3Material, Block[] par4BlockArray)
{
super(par1);
this.toolMaterial = par3Material;
this.blocksEffectiveAgainst = par4BlockArray;
this.maxStackSize = 1;
this.setMaxDamage(par3Material.getMaxUses());
this.efficiencyOnProperMaterial = par3Material.getEfficiencyOnProperMaterial();
this.damageVsEntity = par2 + par3Material.getDamageVsEntity();
this.setTabToDisplayOn(CreativeTabs.tabTools);
}
public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block)
{
Block[] var3 = this.blocksEffectiveAgainst;
int var4 = var3.length;
for (int var5 = 0; var5 < var4; var5++)
{
Block var6 = var3[var5];
if (var6 == par2Block)
{
return this.efficiencyOnProperMaterial;
}
}
return 1.0F;
}
public boolean hitEntity(ItemStack par1ItemStack, EntityLiving par2EntityLiving,EntityLiving par3EntityLiving)
{
par1ItemStack.damageItem(2, par3EntityLiving);
return true;
}
public boolean func_77660_a(ItemStack par1ItemStack, World world, int par3, int par4, int par5, int par6, EntityLiving par7EntityLiving)
{
if ((double)Block.blocksList[par3].getBlockHardness(world,par4,par5,par6) != 0.0D)
{
par1ItemStack.damageItem(1, par7EntityLiving);
}
return true;
}
public int getDamageVsEntity(Entity par1Entity)
{
return this.toolMaterial.getEnchantability();
}
public boolean isFill3D()
{
return true;
}
public int getEnchantability()
{
return this.toolMaterial.getEnchantability();
}
public String func_77861_e()
{
return this.toolMaterial.toString();
}
}
Recipe for the Knife:
/** code generated by Tavitoes */
package net.minecraft.src;
public class mod_DragonKnifeRecipe extends BaseModMp
{
public void load()
{
ModLoader.addRecipe(new ItemStack(Item.DragonKnife, 1), new Object []{ "!@#", "$%^", "&*X", Character.valueOf('!'), Item.air, Character.valueOf('@'), Item.air, Character.valueOf('#'), Item.air, Character.valueOf('$'), Item.air, Character.valueOf('%'), Item.air, Character.valueOf('^'), Item.DragonIngot, Character.valueOf('&'), Item.air, Character.valueOf('*'), Item.stick, Character.valueOf('X'), Item.air});
}
public String getVersion()
{
return "code generated by Tavitoes";
}
}
And, finally, some additional info for the knife.
/** code generated by Tavitoes */
package net.minecraft.src;
public class mod_DragonKnife extends BaseModMp
{
public static final Item Dragon Knife = new ItemDragon Knife(18924, EnumToolMaterialDragonIngot.DragonIngot).setItemName("Dragon Knife");
public void load()
{
Dragon Knife.setIconIndex(ModLoader.addOverride("/gui/items.png", "/DragonKnife.png"));
ModLoader.addName(Dragon Knife, "Dragon Knife");
}
public String getVersion()
{
return "code generated by Tavitoes";
}
}
I hope all of this works and there are no glitches.
Thanks!
And if you don't know what to do with this, turn it into a .java file, then a .class file. If you make textures for these, name them DragonIngot.png and DragonKnife.png. Case sensitive.
Maybe the Dragon Knife could have a shorter range of around two blocks. The Dragon Ingot could be dropped from Dragon Raiders (If the mod adds any, they would attack with Bows and with the Dragon Knife) then you can use them to make the Knife. It could have a Blaze Rod and Bone handle variant as well, the bone one would be useful, as it increases knockback and the Knife has shorter range. Another possibility is that it causes two extra hearts of damage to Dragons! As they would have Massive HP, like the Ender Dragon, but not so strong, since they are not a Boss. Due to the rarity of Dragons and Raiders, the weapon would have an amazing durability.
Maybe the Dragon Knife could have a shorter range of around two blocks, but might have a 5% or 10% of chance to steal half of the damage done, including increased damage from Critical Hits. The Dragon Ingot could be dropped as a rare drop from Knights and Paladins, then you can use them to make the Knife. It could have a Blaze Rod and Bone handle variant as well (The bone one would be useful, as it increases knockback and the Knife has shorter range)
That works. Code has been integrated. Making bone one now. Should I make a blaze rod one, too?
/** code generated by Tavitoes */
package net.minecraft.src;
public class ItemBoneDragonKnife extends Item
{
private int weaponDamage;
private final EnumToolMaterialDragonIngot toolMaterial;
public ItemBoneDragonKnife(int par1, EnumToolMaterialDragonIngot par2Material)
{
super(par1);
this.toolMaterial = par2Material;
this.maxStackSize = 1;
this.setMaxDamage(par2Material.getMaxUses());
this.setTabToDisplayOn(CreativeTabs.tabCombat);
this.weaponDamage = 4 + par2Material.getDamageVsEntity();
}
public float getStrVsBlock(ItemStack itemstack, Block block)
{
return block.blockID == Block.web.blockID ? 15.0F : 1.5F;
}
public boolean hitEntity(ItemStack itemstack, EntityLiving par2EntityLiving, EntityLiving par3EntityLiving)
{
itemstack.damageItem(1, par3EntityLiving);
return true;
}
public boolean onBlockDestroyed(ItemStack par1ItemStack, World par2World, int par3, int par4, int par5, int par6, EntityLiving par7EntityLiving)
{
if ((double)Block.blocksList[par3].getBlockHardness(par2World, par4, par5, par6) != 0.0D)
{
par1ItemStack.damageItem(2, par7EntityLiving);
}
return true;
}
public int getDamageVsEntity(Entity par1Entity)
{
return this.weaponDamage;
}
public boolean isFull3D()
{
return true;
} public EnumAction getItemUseAction(ItemStack itemstack)
{
return EnumAction.block;
}
public int getMaxItemUseDuration(ItemStack par1ItemStack)
{
return 72000;
}
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityPlayer)
{
entityPlayer.setItemInUse(itemstack, this.getMaxItemUseDuration(itemstack)); return itemstack;
}
public boolean cahHarvestBlock(Block block)
{
return block.blockID == Block.web.blockID;
}
public int getItemEnchantability()
{
return this.toolMaterial.getEnchantability();
}
public String func_77825_f()
{
return this.toolMaterial.toString();
}
}
Recipe:
/** code generated by Tavitoes */
package net.minecraft.src;
public class mod_BoneDragonKnifeRecipe extends BaseModMp
{
public void load()
{
ModLoader.addRecipe(new ItemStack(Item.BoneDrsgonKnife, 1), new Object []{ "!@#", "$%^", "&*X", Character.valueOf('!'), Item.air, Character.valueOf('@'), Item.air, Character.valueOf('#'), Item.air, Character.valueOf('$'), Item.air, Character.valueOf('%'), Item.air, Character.valueOf('^'), Item.DragonIngot, Character.valueOf('&'), Item.air, Character.valueOf('*'), Item.bone, Character.valueOf('X'), Item.air});
}
public String getVersion()
{
return "code generated by Tavitoes";
}
}
Additional info for the Bone Dragon Knife:
/** code generated by Tavitoes */
package net.minecraft.src;
public class mod_BoneDragonKnife extends BaseModMp
{
public static final Item BoneDragonKnife = new ItemBoneDragonKnife(18924, EnumToolMaterialDragonIngot.DragonIngot).setItemName("BoneDragonKnife");
public void load()
{
BoneDragonKnife.setIconIndex(ModLoader.addOverride("/gui/items.png", "/BoneDragonKnife.png"));
ModLoader.addName(BoneDragonKnife, "Bone Dragon Knife");
}
public String getVersion()
{
return "code generated by Tavitoes";
}
}
Sorry for the long posts, but there's really no other way to do this.
/** code generated by Tavitoes */
package net.minecraft.src;
public class ItemFireDragonKnife extends Item
{
private int weaponDamage;
private final EnumToolMaterialDragonIngot toolMaterial;
public ItemFireDragonKnife(int par1, EnumToolMaterialDragonIngot par2Material)
{
super(par1);
this.toolMaterial = par2Material;
this.maxStackSize = 1;
this.setMaxDamage(par2Material.getMaxUses());
this.setTabToDisplayOn(CreativeTabs.tabCombat);
this.weaponDamage = 4 + par2Material.getDamageVsEntity();
}
public float getStrVsBlock(ItemStack itemstack, Block block)
{
return block.blockID == Block.web.blockID ? 15.0F : 1.5F;
}
public boolean hitEntity(ItemStack itemstack, EntityLiving par2EntityLiving, EntityLiving par3EntityLiving)
{
itemstack.damageItem(1, par3EntityLiving);
return true;
}
public boolean onBlockDestroyed(ItemStack par1ItemStack, World par2World, int par3, int par4, int par5, int par6, EntityLiving par7EntityLiving)
{
if ((double)Block.blocksList[par3].getBlockHardness(par2World, par4, par5, par6) != 0.0D)
{
par1ItemStack.damageItem(2, par7EntityLiving);
}
return true;
}
public int getDamageVsEntity(Entity par1Entity)
{
return this.weaponDamage;
}
public boolean isFull3D()
{
return true;
} public EnumAction getItemUseAction(ItemStack itemstack)
{
return EnumAction.block;
}
public int getMaxItemUseDuration(ItemStack par1ItemStack)
{
return 72000;
}
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityPlayer)
{
entityPlayer.setItemInUse(itemstack, this.getMaxItemUseDuration(itemstack)); return itemstack;
}
public boolean cahHarvestBlock(Block block)
{
return block.blockID == Block.web.blockID;
}
public int getItemEnchantability()
{
return this.toolMaterial.getEnchantability();
}
public String func_77825_f()
{
return this.toolMaterial.toString();
}
}
Recipe:
/** code generated by Tavitoes */
package net.minecraft.src;
public class mod_FireDragonKnifeRecipe extends BaseModMp
{
public void load()
{
ModLoader.addRecipe(new ItemStack(Item.FireDragonKnife, 1), new Object []{ "!@#", "$%^", "&*X", Character.valueOf('!'), Item.air, Character.valueOf('@'), Item.air, Character.valueOf('#'), Item.air, Character.valueOf('$'), Item.air, Character.valueOf('%'), Item.air, Character.valueOf('^'), Item.DragonIngot, Character.valueOf('&'), Item.air, Character.valueOf('*'), Item.blazerod, Character.valueOf('X'), Item.air});
}
public String getVersion()
{
return "code generated by Tavitoes";
}
}
Additional info for the Fire Dragon Knife:
/** code generated by Tavitoes */
package net.minecraft.src;
public class mod_FireDragonKnife extends BaseModMp
{
public static final Item FireDragonKnife = new ItemFireDragonKnife(18924, EnumToolMaterialDragonIngot.DragonIngot).setItemName("FireDragonKnife");
public void load()
{
FireDragonKnife.setIconIndex(ModLoader.addOverride("/gui/items.png", "/FireDragonKnife.png"));
ModLoader.addName(FireDragonKnife, "Fire Dragon Knife");
}
public String getVersion()
{
return "code generated by Tavitoes";
}
}
Thanks!
P.S. This was made for ModLoader. I hope you guys code for Modloader, too, 'cause I don't know how to do Forge.
Thanks for the Coding Tavitoes! If possible, you could try to use a Spoiler next time, so the posts are not so big xP But if you took so little time to code the Knife, i can see the development will grow faster than we can expect!
Thanks for the Coding Tavitoes! If possible, you could try to use a Spoiler next time, so the posts are not so big xP But if you took so little time to code the Knife, i can see the development will grow faster than we can expect!
Thanks! I hope this little piece of work I made gets in the mod!
I made something else. This is an item called Dragon Coal. It is a very powerful type of coal. It is found as an ore found in veins of only one in deep caves. It can cook 20 items, as opposed to regular coal, which can cook eight.
Dragon Coal Ore:
/** code generated by Tavitoes */
package net.minecraft.src;
import java.util.Random;
public class BlockDragonCoalOre extends Block
{
protected BlockDragonCoalOre(int par1, Material par2Material)
{
super(par1,par2Material);
}
public int idDropped(int par1, Random random)
{
return Item.DragonCoal.shiftedIndex;
}
}
Additional info for Dragon Coal Ore:
/** code generated by Tavitoes */
package net.minecraft.src;
import java.util.Random;
public class mod_DragonCoalOre extends BaseModMp
{
public static final Block DragonCoalOre = new BlockDragonCoalOre(163, Material.ground).setLightValue(.08564F).setHardness(0.7F).setBlockName("DragonCoalOre");
public void load()
{
ModLoader.registerBlock(DragonCoalOre);
ModLoader.addName(DragonCoalOre, "Dragon Coal Ore");
DragonCoalOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/DragonCoalOre.png");
}
public String getVersion()
{
return "1.0 code generated by Tavitoes";
}
public void generateSurface(World world, Random rand, int ChunkX, int ChunkZ)
{
for (int i = 0; i < 20; i++)
{
int randPosX = ChunkX + rand.nextInt(16);
int randPosY = rand.nextInt(1);
int randPosZ = ChunkZ + rand.nextInt(16);
(new WorldGenMinable(DragonCoalOre.blockID, 1)).generate(world,rand,randPosX,randPosY,randPosZ);
}
}
}
Dragon Coal:
/** code generated by Tavitoes */
package net.minecraft.src;
public class mod_DragonCoal extends BaseModMp
{
public static final Item DragonCoal = new Item(17665).setIconIndex(ModLoader.addOverride("/gui/items.png", "/DragonCoal.png")).setItemName("DragonCoal");
public void load()
{
ModLoader.addName(DragonCoal, "Dragon Coal");
}
public String getVersion()
{
return "code generated by Tavitoes";
}
}
Additional info for Dragon Coal:
/** code generated by Tavitoes */
package net.minecraft.src;
public class mod_DragonCoalFuel extends BaseModMp
{
public void load()
{
}
public String getVersion()
{
return "code generated by Tavitoes";
}
public int addFuel(int i, int j)
{
if (i == Item.DragonCoal.shiftedIndex)
{
return 4000;
}
return j; }
}
Hmm, i don't know if we should add a new ore... There is also no much need for a new fuel, when you get to the Nether you can get loads of Lava to smelt things. The furnace can spend more than a day smelting things with one Lava Bucket.
Hmm, i don't know if we should add a new ore... There is also no much need for a new fuel, when you get to the Nether you can get loads of Lava to smelt things. The furnace can spend more than a day smelting things with one Lava Bucket.
Okay. I'll still keep it, because you never know when you'll need a new ore.
no sig yay
NIce !
Thanks ! Will Do , We Have Decided To Release It A Little Bit Early But It Will Only Have Some Of The Decorative Blocks And Possibly A Few Weapons.
no sig yay
no sig yay
Dragon Knife:
Dragon Ingot:
Toolset for the Knife:
Recipe for the Knife:
And, finally, some additional info for the knife.
I hope all of this works and there are no glitches.
Thanks!
And if you don't know what to do with this, turn it into a .java file, then a .class file. If you make textures for these, name them DragonIngot.png and DragonKnife.png. Case sensitive.
no sig yay
no sig yay
That works. Code has been integrated. Making bone one now. Should I make a blaze rod one, too?
Recipe:
Additional info for the Bone Dragon Knife:
Sorry for the long posts, but there's really no other way to do this.
Recipe:
Additional info for the Fire Dragon Knife:
Thanks!
P.S. This was made for ModLoader. I hope you guys code for Modloader, too, 'cause I don't know how to do Forge.
This mod has a lot to be done. You should just follow the topic until the alpha release comes out.
no sig yay
Thanks! I hope this little piece of work I made gets in the mod!
Dragon Coal Ore:
Additional info for Dragon Coal Ore:
Dragon Coal:
Additional info for Dragon Coal:
Thanks!
no sig yay
Okay. I'll still keep it, because you never know when you'll need a new ore.
no sig yay
Took a lot of work! What do you guys think?
no sig yay