How do i make a delay?

Started by ManTruck29 on

Topic category: Help with modding (Java Edition)

Last seen on 17:06, 14. Apr 2024
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do i make a delay?

Hello there! So i have made a Furnace block with the crafting table procedure and i don't have idea how to make a delay timer for the tick. Basically i want it to work like a normal furnace where you have to wait to get the smelting results... Before some of you ask. Yes i have tried the "Wait X Ticks on server side" Block but it seems like it loops and it gives the smelting results 2 times and as i have noticed if you put on input a stack or more than 1 items it will remove 2 of them which means that the procedure is doing a loop and i don't have an idea how to stop the loop... Before you also ask. Yes i have tried lot's of tutorials and i have searched  all around the Forums but found 0 solution. Before you also ask. I can't use any "NBT tags" because it says "Block block_nbt_logic_set is not supported by the selected generator. it will be skipped." I'm using Fabric for my mod and if anyone could help or give me an advice it would be awesome...

Last seen on 19:20, 25. Jun 2023
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Have you tried local…
Mon, 05/01/2023 - 01:43

Have you tried local variables? They are on the right in the procedure menu, on a tick update you can drop the variable by 1 and check if it is 0. If it is 0, the furnace should smelt.

Last seen on 17:06, 14. Apr 2024
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I haven't tried the Local…
Mon, 05/01/2023 - 12:20

I haven't tried the Local Variables. What Variable should i put? And how to use it on the procedures?

 

Last seen on 19:20, 25. Jun 2023
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So... I think this may not…
Sat, 05/06/2023 - 16:31

So... I think this may not work (but still try because it might, I don't know the behavior of local variables)

Put "Tick rate" in advanced properties to 1.

In the "block update" trigger, make a procedure. In the procedure, make a local variable with type "number" and name "furnaceTicks"

If everything is ready to start smelting and furnaceTicks is -1, set furnaceTicks to the starting value

If furnaceTicks is 0 and everything is still in the right places, remove the item that should be smelted, place the result in whatever slot is needed and set furnaceTicks to -1.

If you need me to explain how to check if things are in the right places, just let me know