Jump to content

[1.7.2] adding Tools/ToolMaterial


Alexander0507

Recommended Posts

This is what you can use for the ToolMaterial.

 

public static ToolMaterial ToolMaterialName = EnumHelper.addToolMaterial("REDSTONE", HarvestLevel, MaxUses, Efficiency, Damage, Enchantment);

 

Just remember if you haven't used ToolMaterial before the Efficiency and the Damage are both floats!

Check Out My Modding Tutorials For Minecraft Forge!

 

http://www.youtube.com/user/XxxXEclipse7XxxX

 

 

Check Out My Forums -

http://www.theaustralianmodder.com

Link to comment
Share on other sites

Got A Problem with crafting now.

 

I have this setup actually loading,

 

 

 

public static void addCrafting(){

 

GameRegistry.addShapedRecipe(new ItemStack(sword), new Object[] { " XX",

" x ",

" x ",

" / ",

 

'X', Items.ingot,

'/', net.minecraft.init.Items.stick

});

}

 

 

(checked the loading with system.out.println )

but I can't craft it. I think the problem is when I use a stick. Also can't import that class it tells me it's a unused import

Link to comment
Share on other sites

public static void addCrafting(){
    GameRegistry.addShapedRecipe(new ItemStack(sword),
new Object[] {	" XX",
			" x ",
			" x ",
			" / ",
			'X', Items.ingot,	
			'/', net.minecraft.init.Items.stick
		   });
}

I dunno if it's just me, but it appears that your crafting table has 4 rows in the grid. I hope that is wrong and you removed the extra row in your actual code.

 

Link to comment
Share on other sites

This works

 

//make golden sword from 1 stick, 2 blocks of dirt v.1.7.2
    	GameRegistry.addShapedRecipe(new ItemStack(Items.golden_sword, 1),
    			new Object[]{ "X1X", "X4X", "X7X", 
    		Character.valueOf('1'), new ItemStack(Blocks.dirt, 1), 
    		Character.valueOf('4'), new ItemStack(Blocks.dirt, 1), 
    		Character.valueOf('7'), new ItemStack(Items.stick, 1), 
    	});}

 

"XXX", "XXX", "XXX" represents the slots in the crafting window

"012", "345", "678"

hj52.png

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.