Drink Brewer

Started by MCGamingBear on

Topic category: Help with Minecraft modding (Java Edition)

Joined Sep 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Drink Brewer
Sun, 09/09/2018 - 21:16 (edited)

I am making a food mod, and I need help with a drink brewer. Add a fruit in, turns into juice, or smoothie if you have a bottle. Using a tutorial for a crafting table WON'T work. Crafting Table, off the list. PLZ Help me. "Halp Me Plz, Me"

Edited by MCGamingBear on Sun, 09/09/2018 - 21:16
Joined Dec 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Assuming you've made the gui…
Tue, 10/08/2024 - 14:54

Assuming you've made the gui, all you need are recipe procedures for each recipe and a timer if your juice takes time to brew.

What you need to know to make recipes

  1. The slot number for each slot in your gui and their purpose
    1. Slot 0 for example is your fruit slot
    2. Slot 1 is your bottle
    3. Slot 2 is your fuel if it uses fuel
    4. Slot 3 is your output
    5. Your results may be different from mine, this is just a reference
  2. The Recipe itself
    1. 1 Apple + 1 Bottle = 1 Juice
    2. 1 Apple + 2 Bottle = 2 Juice
    3. 2 Apple + 1 Bottle = 1 Juice (You get my point)
  3. Block Entity needs to be set up in your block
    1. Enable block entity
    2. Bind the blocks GUI
    3. Open bound GUI on right click
    4. Size of inventory (Number of input/output slots)
    5. Only Disable taking from slots if you don't want player to take from or input into certain slots
  4. GUI Slot Setup
    1. When editing your GUI, use Limit Stack input to prevent inputting the wrong stuff in the wrong slots
    2. Select Bottle for your bottle slot
    3. Create a fruit tag and use that for the fruit slot
    4. If you use fuel, create a fuel tag and use that for your desired fuels
  5. On tick update procedure (I believe)
    1. If Fruit slot contains a certain fruit AND bottle slot contains a bottle do wait # tick then remove item from fruit slot and remove item from bottle slot and place juice item in juice item slot
    2. Create several else-if blocks within this procedure for each recipe
    3. This SHOULD trigger every time you open and/or insert and item into the block.
  6. Plausible Issues with this
    1. May cause unintentional mass production if not set up right
    2. If you want it to work like a furnace, instead of using wait statements, use a number variable and repeat statements that reduce that variable by 1 each time until the number hits 0 again.
      1. When the number hits 0, you will remove the items and set the juice in the slot, then the timer will restart if there are still items in the slot due to having a stack greater than 1 item.
  7. If this does not work, or you can not figure it out, I will create something myself and tinker until I get it to work.