Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

How do i make a custom weapon?


J0WAY
 Share

Recommended Posts

Ok so i made custom swords/axes/pickaxes/hoes/shovels which in each one they would have something like: public static final ItemHoe OBSIDIANSHARD_HOE = new ToolHoe("ObsidianShard_hoe", MATERIAL_OBSIDIAN_SHARD);
But i was wondering if i made a custom weapon like a Waraxe would i use ItemAxe or ItemSword which if not how do i make it custom because i just try'd with ItemWaraxe and it wouldn't work and it wanted me to switch to axe instead, If you could tell me what i do to make a custom weapon like a Waraxe it would help alot.

Edited by J0WAY
Link to comment
Share on other sites

2 hours ago, J0WAY said:

public static final ItemHoe OBSIDIANSHARD_HOE = new ToolHoe("ObsidianShard_hoe", MATERIAL_OBSIDIAN_SHARD);

Items must be initialized in their appropriate registry event.

 

In case of an axe+sword you might want to extend ItemSword, since mods and vanilla minecraft often use an instanceof ItemSword check. The axe functionality however can be achieved via tool classes.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.