Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Do I still need to copy the classes like ToolMaterial, ItemTool and ItemPickaxe ?

Cause when I try to copy ToolMaterial it just sends me to the Item class and really ? A new Item.class ?

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

  • Author

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

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.

 

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

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.