Topic category: Help with Minecraft modding (Java Edition)
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 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.
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.
You need to make sure that the inventory is actually part of the entity, not only that the inventory only opens when right clicked.
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.
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.
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 ?
Yes, the inventory tab.
I'll try tomorrow and give you a quick response. I hope this will work.
Thank you sir !
Specifically, you need to use this:
Okay thanks. And what about the "remove" item ? One of my staff says he can't find it.
Get the amount of items in the slot and set them to that amount - 1
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
Thanks Nerdy. It works. You are awesome.
We can close this topic ! I'll be back later with questions. :)
This is a really quick and nice run-down :)
Has one of you also made it work to only consume fuel when moving?