Tutorials Navigation
[ Minecraft ] Create Your Own Weapon! [ v1.1 ]
Tutorial Name: [ Minecraft ] Create Your Own Weapon! [ v1.1 ]
Category: PC Tutorials
Submitted By: Console
Date Added:
Comments: 0
Views: 10,240
Related Forum: PC Building Forum
Share:
Create Your Own Weapon!
Tutorial -
Difficulty - 2/10
Version - v1.1 haven't tried for v1.2
Creating Weapon Physical Damage (for modloader)
Ok, you start of with your mod_**** file
Now Define the item in your mod_**** file.
If it was ItemDagger it would be
At public ItemDagger(int i) why is there the (int i)?
Because the interface will be defined as i, allowing super(i); Function to work
Now add your flashy epic features of flashy epic
Finish with a
Now we wanna get the item to take damage
so below all we added we should also add
this code refers to that when the item hits a entity, it takes 1 damage, and when destroys a block, it takes 2, Mess around with that if you want
Now we have to vertify function "field_22047_d;"
Add this below what you have added
Finally finish off with this
So were done, recompile and test your weapon!
if your getting errors, use this base structure !
Hope you guys like this tutorial there will be more up soon. Thanks for everyone rating and viewing my tutorials.
Last Tutorial (RedstoneWire)
Next Tutorial -
How To Use Infinite Terrain And Sprite Indexes!
Heres a sneak pic of the next,next tutorial...
How To Make Custom Filled Buckets!
Hey guys if you guys need any help message me!
Tutorial -
Difficulty - 2/10
Version - v1.1 haven't tried for v1.2
Creating Weapon Physical Damage (for modloader)
Ok, you start of with your mod_**** file
Now Define the item in your mod_**** file.
EXAMPLE: Public static final ItemDagger = (new ItemDagger(100)). *Extra Features of your Item go here*
If it was ItemDagger it would be
package net.minecraft.src;
public class ItemDagger extends Item
public ItemDagger(int i)
{
super(i);
At public ItemDagger(int i) why is there the (int i)?
Because the interface will be defined as i, allowing super(i); Function to work
Now add your flashy epic features of flashy epic
maxStackSize = 1; MAX STACK SIZE
maxDamage = 3124; HOW DURABLE IT IS, IN THIS CASE 3124 USES
field_22047_d = 20; THE AMOUNT OF DAMAGE, 20 HEALTH OR 10 HEARTS.
Finish with a
}
Now we wanna get the item to take damage
so below all we added we should also add
public void hitEntity(ItemStack itemstack, EntityLiving entityliving)
{
itemstack.damageItem(1);
}
public void hitBlock(ItemStack itemstack, int i, int j, int k, int l)
{
itemstack.damageItem(2);
}
this code refers to that when the item hits a entity, it takes 1 damage, and when destroys a block, it takes 2, Mess around with that if you want
Now we have to vertify function "field_22047_d;"
Add this below what you have added
public int getDamageVsEntity(Entity entity)
{
return field_22047_d;
}
public boolean isFull3D()
{
return true;
}
Finally finish off with this
private int field_22047_d;
}
So were done, recompile and test your weapon!
if your getting errors, use this base structure !
package net.minecraft.src;
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
public class ItemDagger extends Item
{
public ItemDagger(int i)
{
super(i);
maxStackSize = 1;
maxDamage = 500;
field_22047_d = 5;
}
public void hitEntity(ItemStack itemstack, EntityLiving entityliving)
{
itemstack.damageItem(1);
}
public void hitBlock(ItemStack itemstack, int i, int j, int k, int l)
{
itemstack.damageItem(2);
}
public int getDamageVsEntity(Entity entity)
{
return field_22047_d;
}
public boolean isFull3D()
{
return true;
}
private int field_22047_d;
}
Hope you guys like this tutorial there will be more up soon. Thanks for everyone rating and viewing my tutorials.
Last Tutorial (RedstoneWire)
Next Tutorial -
How To Use Infinite Terrain And Sprite Indexes!
Heres a sneak pic of the next,next tutorial...
How To Make Custom Filled Buckets!
Hey guys if you guys need any help message me!
Ratings
Comments
Related Tutorials
- 01. Emulating Xbox 360 on PC for Running COD4 With Mods(2,122)
- 02. How to: Matrix Numbers | Batch File(1,593)
- 03. How to Password Protect Files on Windows(765)
- 04. How to play Socom 2/3/ and Combined Assault on PC(5,192)
- 05. Modern Warfare 2 Vac Ban Bypass Tutorial(5,046)
- 06. How to embed an image on TheTechGame(2,780)
- 07. [PC] NIOH 2 OTHER USER SAVE RESIGN(12,347)
- 08. Host bot lobbies! Full Tutorial!(9,578)
- 09. Unban yourself [Plutonium BO2](13,475)
- 10. Fall Guys - How to Change Your Name Color on Fall Guys(8,027)
- 11. Best Crosshair Settings for Valorant(6,170)
- 12. Othercide The Surgeon Boss Guide(2,229)
- 13. Othercide Remembrances Unlock Guide(3,929)
- 14. Othercide Beginners Tips and Tricks(2,469)
- 15. How to Fix Grounded Crashes, Loading Time, Low FPS and Other(4,367)
"[ Minecraft ] Create Your Own Weapon! [ v1.1 ]" :: Login/Create an Account :: 0 comments