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

So I want to replace the recipes of furnace and stone tools and make them require a new, more expensive material I created.

 

I managed to remove the recipes by replacing them with a dummy recipe, using a code like this:

public static void removeRecipes() {
			 ForgeRegistry<IRecipe> recipeRegistry = (ForgeRegistry<IRecipe>)ForgeRegistries.RECIPES;
		        @SuppressWarnings("deprecation")
				ArrayList<IRecipe> recipes = Lists.newArrayList(recipeRegistry.getValues());
		        
		        for (IRecipe r : recipes)
	            {
	                ItemStack output = r.getRecipeOutput();
	                if (output.getItem() == Item.getItemFromBlock(Blocks.FURNACE))
	                {
	                    recipeRegistry.remove(r.getRegistryName());
	                    recipeRegistry.register(DummyRecipe.from(r));
	                }
	            }
		}

 

I have also created my own furnaceJ.json file with the new recipe, however this recipe seems to also be overriden by the dummy recipe.

 

I read that the solution is to register my own recipe instead of the dummy one in this line:

recipeRegistry.register(DummyRecipe.from(r));

 

But... how can I do it? My recipe is saved in a .json file, not in a .java file like the Dummy recipe.

 

I know the solution is probably very simple but I just can't see it.

  • Author
21 hours ago, diesieben07 said:

Check if the registry name of the recipe is the vanilla recipe before removing it.

How can I do that? Is there any method for that?

  • Author
2 minutes ago, diesieben07 said:

You are already calling it:

 

I know I should be using something like if (r.getRegistryName() == ???)

 

But I don't know how the vanilla recipe is called

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.