Crafting block with a timer

Started by Van on

Topic category: User side tutorials

Last seen on 16:50, 22. Apr 2024
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Crafting block with a timer
Sat, 05/08/2021 - 07:55 (edited)

Hey, first quick tutorial. Here's how to make a crafting block with a timer for your recipe. It can be extended for different items too, let me know if you would like me to show you how. It's pretty straighforward though.

Let's take a look at my workspace elements:

workspace

you can see I've got my:

  1. gui element
  2. 13 simple true/false checks for progress pictures in gui
  3. crafting block
  4. 2 procedures, one for crafting and one for gui progress picture swapping

let's look at my GUI:

gui

as you can see it's very simple. one slot in, one slot out, some text, some decoration and a progress bar

guiele

progress bar is simply made of 13 pictures below:

progress bar

 

ok, let's go. first you need to make a crafting block, make it look however you want, but make sure to tick those settings - i use 20 tick rate because 20 ticks = 1 second. default setting for blocks is 10 ticks.

cbset

this below is the most important. set slot numbers etc. depending on how your GUI looks.

cbset2

now make a new procedure in this trigger:

updtk

this is the procedure you want to replicate in your workspace. picture should explain everything, if you will have questions, ask in comment.

prc

 

now go back to your GUI and look in left bottom corner. make a new procedure here:

prcgui

its really simple - it tells your GUI which progress bar picture to use :)

guipc1

save everything, now make a new, separate procedure - this is a procedure that you will use to display a progress bar picture.. duplicate it for every progress bar picture you have, so for example my progress bar is made of 13 pictures, because i've set up my crafting to be 12 seconds long (20 update tick = 1 second) so i use 13 pictures (0 progress, 1-11 working, 12 finished)

remember to set up craftTimer number correctly to corresponding procedure name

for example:

gui1.png = 0 (no progress)

gui2.png = 1 (timer is ticking)

etc. etc.

ddd

now go back to your GUI mod element and double click every progress picture you have and connect your procedures, example below:

ddd

 

save everything.. and result should look like this https://i.imgur.com/TarH5rb.mp4 :)

if you have any questions ask here or on discord, my nick is Van, i'm on the mctoolkit / nwtg / mchub servers.

Edited by Van on Sat, 05/08/2021 - 07:55
Last seen on 14:46, 8. Oct 2023
Joined Sep 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can you leave a sample…
Mon, 05/24/2021 - 03:47

Can you leave a sample workspace.

Last seen on 09:42, 5. Sep 2023
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
     This is great. Thank…
Mon, 05/24/2021 - 10:28

 

 

 This is great. Thank you!

 

Chew