Content: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Background: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Welcome to TerraFirmaCraft Forums

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

  • Announcements

    • Dries007

      ATTENTION Forum Database Breach   03/04/2019

      There has been a breach of our database. Please make sure you change your password (use a password manager, like Lastpass).
      If you used this password anywhere else, change that too! The passwords themselves are stored hashed, but may old accounts still had old, insecure (by today's standards) hashes from back when they where created. This means they can be "cracked" more easily. Other leaked information includes: email, IP, account name.
      I'm trying my best to find out more and keep everyone up to date. Discord (http://invite.gg/TerraFirmaCraft) is the best option for up to date news and questions. I'm sorry for this, but the damage has been done. All I can do is try to make sure it doesn't happen again.
    • Claycorp

      This forum is now READ ONLY!   01/20/2020

      As of this post and forever into the future this forum has been put into READ ONLY MODE. There will be no new posts! A replacement is coming SoonTM . If you wish to stay up-to-date on whats going on or post your content. Please use the Discord or Sub-Reddit until the new forums are running.

      Any questions or comments can be directed to Claycorp on either platform.
kaldskryke

[78.17] Charcoal pit burn duration issues (annoying)

8 posts in this topic

I'm having issues with 2-high sequoia charcoal pits not completing when they stay in loaded chunks for the entire burn duration. The pit starts properly as indicated by the smoke particles. I loaded the firepit with 4 sequoia logs before being lit and it had a full logpile above it. 

I did a little bit of code digging and found out that:

- while the firepit remains lit, every 100 ticks the charcoal pit checks to see if 18000 ticks have passed since the pit was lit.

- If the firepit runs out of fuel itself before 18000 ticks have passed, charcoal will not be created.

- the firepit only consumes fuel while its chunk is loaded. However, the firepit need not stay loaded for the entire 18000 tick duration.

- on May 7th, code was added to help firepit duration by allowing it to pull logs from an above logpile, but apparently this is insufficient.

 

According to the API EnumWoodMaterial.class, 20 logs of Sequoia wood should burn long enough to last that whole time. And yet with a stopwatch in hand, I've found Sequoia to have about 85% of that burn time... just barely too little to survive 18000 ticks.

 

Is it intentional that Sequoia wood does not burn long enough to complete a charcoal pit (without unloading the chunk)?

 

Thanks!

 

Edit: Kapok and willow are probably even worse off.

0

Share this post


Link to post
Share on other sites

The firepit actually only burns the fuel until it decides that the structure is a charcoal pit. A process that takes about 20 seconds, or 400 ticks. After that point, the fuel inside the firepit, and the pulling from log piles around it ceases.

 

Edit:

public void externalFireCheck()	{		Random R = new Random();		if(externalFireCheckTimer == 0)		{			if(!logPileChecked)			{				logPileChecked = true;				oldWoodCount = externalWoodCount;				externalWoodCount = 0;				ProcessPile(xCoord,yCoord,zCoord,false);				if(oldWoodCount != externalWoodCount)					charcoalCounter = 0;			}			//This is where we handle the counter for producing charcoal. Once it reaches 24hours, we add charcoal to the fire and remove the wood.			if(charcoalCounter == 0)				charcoalCounter = (int) TFC_Time.getTotalTicks();			if(charcoalCounter > 0 && charcoalCounter + (FIREBURNTIME*100) < TFC_Time.getTotalTicks() )			{				logPileChecked = false;				charcoalCounter = 0;				ProcessPile(xCoord,yCoord,zCoord,true);				worldObj.setBlockToAir(xCoord, yCoord, zCoord);			}		}	}

 

As you can see, once the surrounding log piles are checked and the pile has been processed, it simply waits for the charcoal counter to finish, and the fuel inside the firepit no longer matters. The issue that was solved recently was the fact that the fire pit didn't have enough fuel to even make it through the initial 400 ticks to decided that it was indeed a pit.

 

*Ignore the 24 hour note in the comment, I guess Bioxx never updated the documentation when he switched it to 18 hours.

0

Share this post


Link to post
Share on other sites

Wow you're fast. :)

The firepit actually only burns the fuel until it decides that the structure is a charcoal pit. A process that takes about 20 seconds, or 400 ticks. After that point, the fuel inside the firepit, and the pulling from log piles around it ceases.

I'm surprised. I must be missing something, because I don't see that transition anywhere in the code, but then again I'm a Java newbie. So why would the May 7th commit say "Firepits should no longer extinguish if they run out of fuel while having a log pile above them. Instead they will grab a log from the above logpile and use it as fuel instead. Should fix a few instances of charcoal pits not functioning."?

0

Share this post


Link to post
Share on other sites

Check the edit, I clarified what the commit on May 7th fixed.

0

Share this post


Link to post
Share on other sites

Re: your edit

 

The externalFireCheck() method you posted is called from within the update method for the firepit. Notice that the externalFireCheck is called every 100 ticks, but only if the current fireTemp > 1. This is why I figured the firepit was still ticking normally. Sorry about the lousy formatting. If the firepit was to cease burning as per normal, I would have expected that the condition on line 582 would include checking the charcoalCounter

public void updateEntity(){Random R = new Random();int Surrounded = getSurroundedByWood(xCoord,yCoord,zCoord);if(fireTemp > 1 && worldObj.getBlockId(xCoord, yCoord+1, zCoord) == TFCBlocks.LogPile.blockID){externalFireCheckTimer--;if(externalFireCheckTimer <= 0){if(!worldObj.isRemote)externalFireCheck();externalFireCheckTimer = 100;}}
0

Share this post


Link to post
Share on other sites
//Calculate the fire tempfloat desiredTemp = 0;if(Surrounded != 5)	desiredTemp = handleTemp();else	desiredTemp = 1000;handleTempFlux(desiredTemp);

Once the firepit sees that is is surrounded, its temperature stabilizes without the use of burning fuel.

 

The easiest way for you to see this in action is to simply throw a breakpoint on updateEntity(), then make a charcoal pit and watch it cycle. You'll see that after it sees that it's a charcoal pit, it stops with the fuel stuff.

0

Share this post


Link to post
Share on other sites
//Calculate the fire tempfloat desiredTemp = 0;if(Surrounded != 5)	desiredTemp = handleTemp();else	desiredTemp = 1000;handleTempFlux(desiredTemp);

Once the firepit sees that is is surrounded, its temperature stabilizes without the use of burning fuel.

 

Good point... except that a firepit in a charcoal pit does not need to be surrounded on all five sides. They can be started with only one log pile. :S

 

So I guess I should stop making my charcoal pits with the firepit on the outside edge and all my problems will go away. Thanks for your help, Kitty.

0

Share this post


Link to post
Share on other sites

It's technically checking for material.Wood, not specifically for a log pile. So you can still put the fire pit on the outside edge, as long as you put a wooden door in the empty gap instead of a log pile.

1

Share this post


Link to post
Share on other sites