[SOLVED] [PROCEDURE HELP] How to make a working furnace on Entity ?

Started by ChoucrouteLoulou on

Topic category: Help with modding (Java Edition)

Last seen on 16:12, 25. Oct 2022
Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[SOLVED] [PROCEDURE HELP] How to make a working furnace on Entity ?
Tue, 10/04/2022 - 08:04 (edited)

Goodmorning to all of you, I hope you had an excellent week-end.

 

I'm still making my Steampunk Vehicles Mod for our server (and for everyone, later !). I found nearly everything I needed here. But right now I'm stuck.

 

I'm creating a fuel system with a GUI that looks like this :

 

The "Motor" GUI

The slot 0 is built to receive coal and charcoal. In the future I want it to light the furnace on the right of the GUI. It is bind to the entity with the "inventory" tab. The size of the inventory is "1". It works perfectly in my client, just have to shift then right click and I have my wonderful GUI showing.

 

Now here comes the problem...

 

The following procedure is bind to the "On entity Tick Update", in the "Triggers" tab.

But yeah, it doesn't work.

And here is my procedure, bind to "On Entity Tick Update"

I have a local variable named "FuelLevel", a number from that starts from 0. It is used in other procedure such as adding speed to the entity if the fuel level is more than 0, playing an idle sound for the entity, adding particles, lights, etc.

 

Do you guys have any idea on how I should resolve it ? An maybe anticipating with further questions : how do I add a timer for a loop after the last dialog box (The "Set" One), in order to add +1 to my FuelLevel at every loop if there is a coal or charcoal ?

 

Big thanks guys. Greetings from France.

Edited by ChoucrouteLoulou on Tue, 10/04/2022 - 08:04
Last seen on 18:26, 28. Mar 2024
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You need to make sure that…
Mon, 10/03/2022 - 08:38

You need to make sure that the inventory is actually part of the entity, not only that the inventory only opens when right clicked. 

Last seen on 18:26, 28. Mar 2024
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
And you need to not have it…
Mon, 10/03/2022 - 08:39

And you need to not have it as currently open gui, because when the inventory is closed it won't work. Set it to get the items from the inventory of the entity.

Last seen on 18:26, 28. Mar 2024
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Also, to make the furnace…
Mon, 10/03/2022 - 08:40

Also, to make the furnace image light up, you need to set an image condition for the lit furnace image (which goes above the normal furnace) to only be visible when the tag is higher than 0.

Last seen on 16:12, 25. Oct 2022
Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hey Nerdy. Thank you for…
Mon, 10/03/2022 - 09:18

Hey Nerdy. Thank you for your answer. That's very clear.

Just one thing : how do I check that the inventory is part of the entity ? Are you referring to the tab "Inventory" when creating the entity ?

Last seen on 16:12, 25. Oct 2022
Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'll try tomorrow and give…
Mon, 10/03/2022 - 10:04

I'll try tomorrow and give you a quick response. I hope this will work.

 

Thank you sir !

Last seen on 18:26, 28. Mar 2024
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Specifically, you need to…
Mon, 10/03/2022 - 12:00

Specifically, you need to use this:

Example Procedure

Last seen on 16:12, 25. Oct 2022
Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Okay thanks. And what about…
Mon, 10/03/2022 - 12:03

Okay thanks. And what about the "remove" item ? One of my staff says he can't find it.

Last seen on 18:26, 28. Mar 2024
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Get the amount of items in…
Mon, 10/03/2022 - 19:53

Get the amount of items in the slot and set them to that amount - 1

Last seen on 18:26, 28. Mar 2024
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Or use the remove X items…
Mon, 10/03/2022 - 20:16

Or use the remove X items from inventory of event/target entity and replace the item selection block with get copy of item from slot

Last seen on 16:12, 25. Oct 2022
Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks Nerdy. It works. You…
Tue, 10/04/2022 - 07:57

Thanks Nerdy. It works. You are awesome.

 

We can close this topic ! I'll be back later with questions. :)

Last seen on 22:45, 26. Mar 2024
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This is a really quick and…
Fri, 10/28/2022 - 11:19

This is a really quick and nice run-down :)

Has one of you also made it work to only consume fuel when moving?