Jump to content
  • Home
  • Files
  • Docs
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.16.3] Crafting Recipe Returns Multiple Items and Custom Crafting Station
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 0
ehbean

[1.16.3] Crafting Recipe Returns Multiple Items and Custom Crafting Station

By ehbean, November 21, 2020 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

ehbean    0

ehbean

ehbean    0

  • Tree Puncher
  • ehbean
  • Members
  • 0
  • 15 posts
Posted November 21, 2020

Hey there. I've got a quick 2 part question about crafting recipes.

1. I have a Json file set up that returns and item whenever you craft with it, but I would like it to return two different items. (The recipe has you using a mortar and pestle to grind something). So if at all possible I'd like to return both the mortar, and the other item that is made in the process.

 

2. How do I go about making a custom crafting station that accepts only certain items, uses a blaze powder as fuel. It would act similarly to a brewing stand, but I'd like to be able to add a new more crafting "options" going into it for later in this mod I'm working on.

 

Thank you

  • Quote

Share this post


Link to post
Share on other sites

Draco18s    2407

Draco18s

Draco18s    2407

  • Reality Controller
  • Draco18s
  • Members
  • 2407
  • 15940 posts
Posted November 21, 2020 (edited)
3 hours ago, ehbean said:

So if at all possible I'd like to return both the mortar, and the other item that is made in the process.

That's what container items are for. Vanilla does this with buckets of milk, for example. This is not handled by the crafting recipe json, but the item's class.

3 hours ago, ehbean said:

How do I go about making a custom crafting station that accepts only certain items, uses a blaze powder as fuel. It would act similarly to a brewing stand, but I'd like to be able to add a new more crafting "options" going into it for later in this mod I'm working on.

You need slots that only accept specific items.

As an example:
https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/harderfarming/inventory/SaltSlotHandler.java

Used:

https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/harderfarming/entity/TannerTileEntity.java#L56

Edited November 21, 2020 by Draco18s
  • Thanks 1
  • Quote

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Share this post


Link to post
Share on other sites

ehbean    0

ehbean

ehbean    0

  • Tree Puncher
  • ehbean
  • Members
  • 0
  • 15 posts
Posted November 22, 2020
23 hours ago, Draco18s said:

That's what container items are for. Vanilla does this with buckets of milk, for example. This is not handled by the crafting recipe json, but the item's class.

You need slots that only accept specific items.

As an example:
https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/harderfarming/inventory/SaltSlotHandler.java

Used:

https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/harderfarming/entity/TannerTileEntity.java#L56

Where would I find an example of the class that handles the buckets of items? Also, thank you for the GitHub links. Very useful.

  • Quote

Share this post


Link to post
Share on other sites

Draco18s    2407

Draco18s

Draco18s    2407

  • Reality Controller
  • Draco18s
  • Members
  • 2407
  • 15940 posts
Posted November 22, 2020
12 hours ago, ehbean said:

Where would I find an example of the class that handles the buckets of items?

Vanilla code, go find the MilkBucketItem

  • Thanks 1
  • Quote

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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 0
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • uraketu
      Forge Crashing with no reason

      By uraketu · Posted 4 minutes ago

      So i was checking if my modpack works and was deleting the error mods and then it doesnt say what mod caused it pls tell me what to do latest.log
    • diesieben07
      Bug: Nether Quarz Ore does not have toolType

      By diesieben07 · Posted 23 minutes ago

      The only true way to know is to call BlockState#canHarvestBlock, which requires a player and will check the item the player is currently holding or other arbitrary things about the player (mods may have all kinds of arbitrary requirements for harvesting).
    • diesieben07
      AoA mod crashing game

      By diesieben07 · Posted 25 minutes ago

      Best way is probably just to delete it and let it regenerate
    • uraketu
      AoA mod crashing game

      By uraketu · Posted 54 minutes ago

      what should i do?  
    • DancZer
      Bug: Nether Quarz Ore does not have toolType

      By DancZer · Posted 55 minutes ago

      What would be the ideal way to check if I can break a a block by a pickaxe or a shovel?    I rewrote the whole logic and now I use the Item.canHarvestBlock, but it doesn't work reliable neither. For dirt the shovel returns false. 😔   Here is my logic: Github code   Do you have any suggestion?    Thank you in advance and I will let you know when the PR is ready. 
  • Topics

    • uraketu
      2
      Forge Crashing with no reason

      By uraketu
      Started 20 hours ago

    • DancZer
      3
      Bug: Nether Quarz Ore does not have toolType

      By DancZer
      Started December 29, 2020

    • uraketu
      3
      AoA mod crashing game

      By uraketu
      Started 1 hour ago

    • DanielDJ1613
      1
      How do I resolve server errors?

      By DanielDJ1613
      Started 1 hour ago

    • Solarient
      1
      GUIs

      By Solarient
      Started 5 hours ago

  • Who's Online (See full list)

    • diesieben07
    • uraketu
    • Rosy162
    • Lucie
    • TheidenHD
    • GermanBucket
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.16.3] Crafting Recipe Returns Multiple Items and Custom Crafting Station
  • Theme

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