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

I only use this way to make crafting recipes:

 

//Blaze Hammer
	GameRegistry.addRecipe(new ItemStack (MAItems.BlazeHammer),
			new Object [] {
					"BBB",
					"BAB",
					" A ",
					'A', Items.fire_charge,
					'B', Items.blaze_rod
					});

 

(As an example)

 

Is there a way so I can craft items using their ItemID's, I need this for spawn eggs because the metadata is a long process to find out.

Use string names for the spawners.

Also get rid of the 'new Object[]{}' stuff.

And no, you should never use IDs.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

  • Author

Not spawners I mean spawn eggs, I'm using it like this:

 

GameRegistry.addRecipe(new ItemStack (Items.spawn_egg, 1, 383),
			new Object [] {
					"  A",
					"  A",
					"  A",
					'A', Items.diamond,
	});

 

And so far have found most but not all the spawner eggs numbering, this is probably the worst way to do this, if so what way should I bet doing it for the eggs?

  • Author

Is there no way to craft using item ids? since one egg is 383:50 and another 383:51, etc? Also I went through a lot of trial and error (to find the eggs) going like this:

 

//GameRegistry.addRecipe(new ItemStack (Items.spawn_egg, 1, 90), 			Spawn Egg - 'Spawn Pig'
	//GameRegistry.addRecipe(new ItemStack (Items.spawn_egg, 1, 91), 			Spawn Egg - 'Spawn Sheep'

 

And now I'm on "(Items.spawn_egg,1, 427)," and still haven't found them all xD

  • Author

Is this how it should be?

 

GameRegistry.addRecipe(new ItemStack (Items.spawn_egg, 1, 50),
			new Object [] {
					"A  ",
					"A  ",
					"A  ",
					'A', Items.iron_ingot,
	});

Stop, just stop.

This isn't hard.

Your result is a itemstack with a NBT string set to the entity name

So make that item stack.

Then make your recipe using that stack as the result.

Learn how objects work and how variables work before copy/pasting code.

 

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Guest
This topic is now closed to further replies.

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.