Jump to content

[SOLVED] Need help with getting custom furnace to burn fuel


Warren Tode

Recommended Posts

I have a custom furnace with 4 input slots, which I got working correctly to read shaped recipe Json files. I was also able to get the result slot to only allow the player to remove items from it and set the fuel slot so that only fuel items can be placed into it. So all of that is working as intended.

Now I'm trying to get it so that it burns the fuel and crafts the recipe when the fuel is burning. I'm using the ForgeHooks.getBurnTime() method, but nothing seems to be happening - or if something is, I don't have it set up correctly for what I need it to do. It looks like it's not actually detecting the fuel since my furnace doesn't consume it and no errors are popping up, which tells me I'm not pointing at the correct thing. Am I misunderstanding what this method does and completely setting it up wrong, or is there something else that I need to be looking at here because I missed something important somewhere? If I need to roll back and start over to make it work, that's fine too. Any insight would be greatly appreciated.

https://github.com/toadie-odie/TodeVillagers/blob/08_Kiln_not_taking_fuel/src/main/java/net/warrentode/todevillagers/blocks/entity/GlassKilnBlockEntity.java

Link to comment
Share on other sites

23 hours ago, Warren Tode said:

It looks like it's not actually detecting the fuel since my furnace doesn't consume it and no errors are popping up, which tells me I'm not pointing at the correct thing.

Are you verifying this through a breakpoint or printing the server output? I don't see anything major preventing the execution, but I do question a number of the choices made.

Link to comment
Share on other sites

58 minutes ago, ChampionAsh5357 said:

Are you verifying this through a breakpoint or printing the server output? I don't see anything major preventing the execution, but I do question a number of the choices made.

To be completely honest, I've never thought to do that. My learning process in all this has been to just simply start over from scratch if I get completely stuck. I suppose in some ways I learn more that way through experimentation but this has been a sticking point for me for some reason. I will be looking into how to set breakpoints and print outputs to hopefully save me some time later down the road. Thank you. :)

Link to comment
Share on other sites

omg THANK YOU!

I figured out how to use the break points and print outs and by doing that I was able to figure out that I had my check for fuel in the slot was placed in the wrong spot/order, so it wasn't firing.

I had it nested within the check for matching recipe, when I needed the fuel check to happen first. So that's working exactly the way it's supposed to now. There's still a lot of other things I need to tweak/fix/clean up, but I'm marking this as solved and moving on to tinkering with other stuff for this entity.

Again, thank you so much. :D

Link to comment
Share on other sites

  • Warren Tode changed the title to [SOLVED] Need help with getting custom furnace to burn fuel

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.