Jump to content
  • Home
  • Files
  • Docs
  • Merch
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.14.4] Questions about recipes, advancements and tags
1.13 Update Notes for Mod Creators
Sign in to follow this  
Followers 1
yolp900

[1.14.4] Questions about recipes, advancements and tags

By yolp900, October 20 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

yolp900    0

yolp900

yolp900    0

  • Stone Miner
  • yolp900
  • Forge Modder
  • 0
  • 52 posts
Posted October 20

I have a few questions about the crafting system, advancement system and tag system:

 

1. The crafting system: I'm using ShapedRecipeBuilder and ShapelessRecipeBuilder. Say I want to have two different crafting recipes for the same item - How would one do so? Is there an example in vanilla which I missed?

2. About the advancement system: I'm using .addCriterion with InventoryChangeTrigger.Instance.forItems to add a list of items which are needed for the craft. However this only allows a list of items. Is there a way to use tags? i.e. whenever the player has items from the relevant tags - the crafting recipe will be exposed (as opposed to specific items).

3. The new tag system: Is there a convention about adding tags - Which tags are common (other than the given tags in forge), how tags are supposed to be added (I'm extending BlockTagsProvider and ItemTagsProvider from vanilla, is there a way to do so from Forge which I haven't found?). For example, I expected there would be a tag for paper. If I were to add a paper equivalent and wanted recipes to use it too, what should I do?

 

I think theses are general questions which don't need code samples, but just in case here is an example of how I register a recipe:

ShapedRecipeBuilder.shapedRecipe(ModItems.SPELL_PARCHMENT)
                .patternLine(" B ")
                .patternLine("PPP")
                .patternLine(" B ")
                .key('B', ModItemTagsProvider.BINDING_REAGENT)
                .key('P', Items.PAPER)
                .setGroup(Spellies.MOD_ID + "." + SpellParchment.REGISTRY_NAME)
                .addCriterion(SpellParchment.REGISTRY_NAME, InventoryChangeTrigger.Instance.forItems(ModItems.LIGHT_BINDING_REAGENT, Items.PAPER, ModItems.DARK_BINDING_REAGENT))
                .build(consumer);

 

  • Quote

Share this post


Link to post
Share on other sites

Draco18s    2090

Draco18s

Draco18s    2090

  • Reality Controller
  • Draco18s
  • Members
  • 2090
  • 14017 posts
Posted October 20 (edited)
44 minutes ago, yolp900 said:

1. The crafting system: I'm using ShapedRecipeBuilder and ShapelessRecipeBuilder. Say I want to have two different crafting recipes for the same item - How would one do so? Is there an example in vanilla which I missed?

Make two recipe files

 

Quote

2. About the advancement system: I'm using .addCriterion with InventoryChangeTrigger.Instance.forItems to add a list of items which are needed for the craft. However this only allows a list of items. Is there a way to use tags? i.e. whenever the player has items from the relevant tags - the crafting recipe will be exposed (as opposed to specific items).

Use the json system?

  "criteria": {
    "has_planks": {
      "trigger": "minecraft:inventory_changed",
      "conditions": {
        "items": [
          {
            "tag": "minecraft:planks"
          }
        ]
      }
    },

 

Quote

3. The new tag system: Is there a convention about adding tags - Which tags are common (other than the given tags in forge), how tags are supposed to be added (I'm extending BlockTagsProvider and ItemTagsProvider from vanilla, is there a way to do so from Forge which I haven't found?). For example, I expected there would be a tag for paper. If I were to add a paper equivalent and wanted recipes to use it too, what should I do?

You don't need to do that. Just create the json file and call BlockTags/ItemTags.getCollection().getOrCreate(...)

Its right there in the docs.

Edited October 20 by Draco18s
  • Quote

Share this post


Link to post
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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

  • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 1
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Itz_Yuseix
      [1.12.2]Problem with armor animation

      By Itz_Yuseix · Posted 4 minutes ago

      Why my armor dont move?
    • Draco18s
      [1.12.2]Double-part block breaking problem

      By Draco18s · Posted 9 minutes ago

      Whassit called... give me a bit to find it.   Oh yeah, they spite it up. getXOffset(), getYOffset(), getZOffset()   You can also use blockpos.offset(facing).
    • diesieben07
      [1-14-newer] how to make a button with a specified texture ?

      By diesieben07 · Posted 23 minutes ago

      I'm sorry, but WHAT?
    • DaemonUmbra
      Forge or mods not working

      By DaemonUmbra · Posted 26 minutes ago

      The filenames of one or more of your mods suggests you got them from a repost site. Please read up on the StopModReposts project (link in my signature) for info on why this is a bad thing.
    • DaemonUmbra
      Forge mod loader detected missing/unknown registry

      By DaemonUmbra · Posted 34 minutes ago

      Please read the Logs section of my signature below and provide the appropriate log in the appropriate manner.
  • Topics

    • Itz_Yuseix
      0
      [1.12.2]Problem with armor animation

      By Itz_Yuseix
      Started 5 minutes ago

    • LorenzoPapi
      10
      [1.12.2]Double-part block breaking problem

      By LorenzoPapi
      Started Friday at 02:51 PM

    • matt1999rd
      12
      [1-14-newer] how to make a button with a specified texture ?

      By matt1999rd
      Started Yesterday at 04:04 PM

    • Aeriona
      1
      Forge or mods not working

      By Aeriona
      Started 37 minutes ago

    • Autoplexa
      1
      Forge mod loader detected missing/unknown registry

      By Autoplexa
      Started 3 hours ago

  • Who's Online (See full list)

    • Choonster
    • runescaper
    • diesieben07
    • Itz_Yuseix
    • Lea9ue
    • MisteryMan
    • TehStoneMan
    • maxssho13
    • Draco18s
    • DaemonUmbra
    • AdieCraft
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.14.4] Questions about recipes, advancements and tags
  • Theme
  • Contact Us
  • Discord

Copyright © 2019 ForgeDevelopment LLC · Ads by Curse Powered by Invision Community