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 assume I'm just doing something wrong here.  My test recipe shows up in NEI, but it doesn't show up in the recipe book and can't be crafted.  Here's the code:

  @SubscribeEvent
  public static void registerRecipes(final RegistryEvent.Register<IRecipe> event) {
    event.getRegistry().register(
        new ShapelessRecipes(
            "gradient",
            new ItemStack(Items.APPLE),
            NonNullList.from(null, 
                Ingredient.fromStacks(new ItemStack(Items.CLAY_BALL)),
                Ingredient.fromStacks(new ItemStack(Blocks.SAND, 1, OreDictionary.WILDCARD_VALUE))
            )
        ).setRegistryName(GradientMod.MODID, "recipe.tests")
    );
  }

 

For the record, I want to move some of my json recipes back to code because prior to 1.12, many recipes were automatically generated based on melting point, hardness, etc.  With json recipes, whenever I add a new cast/metal/tool/whatever I have to add quite a few files manually.

 

Sub-question:

Was wildcard support removed from json recipes?  When I updated from 1.12 to 1.12.2, this recipe stopped working:

{
  "type": "minecraft:crafting_shapeless",
  "result": {
    "item": "gradient:clay_cast_unhardened",
    "data": 0
  },
  "ingredients": [{
    "item": "minecraft:clay_ball"
  }, {
    "item": "minecraft:sand",
    "data": 32767
  }]
}

 

There were no other changes.  When data is changed from 32767 to 0, the recipe works (but obviously only supports regular sand).

Edited by Corey

You can yes, but you shouldn't. If you have all the data you need at compile time, then just generate the json files. 

As for your second question, we're looking into it, but due to how the recipe book works, you need to specify all sub-items in recipes.

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

Cool, that sounds like a good solution.  Thanks for the help.

 

For anyone else looking for an answer to the second question: until there's a better way, I just ended up defining a _constant called #SAND that includes sand with data 0 and 1.

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.