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.
Sign in to follow this  
Followers 0
Emris

Charcoal pit test

6 posts in this topic

A while back, Jee and a few of us made the biggest charcoal pit that TFC allows, and sadly it crashed the server.

So i decided to make a mod that makes me a charcoal pit, of any size, to test which size the server can take.

9x9x9

Posted Image

Posted Image

15x15x13

Posted Image

Posted Image

21x21x13

Posted Image

Posted Image

and 25x25x13

Posted Image

Posted Image

I had NO problems firing them all up.

The server was using about 160MB RAM the whole time.

So if anyone would like to repeat what we did, it shouldn't be a problem for the server.

1

Share this post


Link to post
Share on other sites

I'm guessing the material was spawned in for these tests? Anyhow, nice work :) Have you given any thought to making a non-centered pit, for science?

0

Share this post


Link to post
Share on other sites

I'm guessing the material was spawned in for these tests? Anyhow, nice work :)/> Have you given any thought to making a non-centered pit, for science?

For science!

Anyways thats a lot of charcoal lol

0

Share this post


Link to post
Share on other sites

Well i changed my mod so i can make any kind of pit size now. (for science :) )

A few pics:

9x9x9 starting the fire in the first left block, and not in the middle.

Posted Image

Posted Image

20x2x3 also starting the fire in the first left block

Posted Image

Posted Image

As you can see, all logs turned into charcoal 12 blocks away from the fire.

This gave me an idea to test other sizes, and i managed to reproduce the BUG that took down Raiser server when Jee and i tried to fire up the 25x25x13 pit.

One of the fixes for this bug is very simple. The code is in TileEntityTerraFirepit.java

In "private void ProcessPile(....)" this needs to be changed from

while(!reachedTop && j+y >= 0)
to

while(!reachedTop && j+y >= 0 && y < 13)
This will make sure that only 12 blocks above the fire will be processed and the array will not go over board.

But i don't think we had that problem on Raiser server...our pit is 13 blocks high.

The other bug is a StackOverflowError, and i'm still trying to pinpoint that one.

It happens with a pit that is 25x25x13 or bigger. (I still have to find all the sizes where this happens)

Update coming soon....

0

Share this post


Link to post
Share on other sites

A small update on the StackOverflowError.

Checking so many blocks with the way how they are checked, the default java stack size runs out of memory.

So this can't really be called a bug.

To solve this problem, you have to add -Xss4M (or at least -Xss2M) to your server start script.

This will make the memory stack big enough to handle 25x25x13 block checking.

0

Share this post


Link to post
Share on other sites

Personally, I think the pit should be checked for volume through interconnecting blocks and for overall size. This would ensure that you could not make a 50 mile long line of log piles and call it a pit but you could make a 35x pit and light it from a corner without only half of it turning into charcoal. From my perspective it shouldnt be too hard to code. Making a list of all the x, y and z axes automatically ignoring duplicates and then use the min/max of all of those to set a box to hold the whole area and check if its within the size limits. Then just use the old minecraft water flood fill mechanic to check all interconnecting blocks. I once used that water flood fill mechanic for an awesome path finding algorithm for a simple game I made in pascal recently for college work. (Yes we have to use pascal, not something conventional like java or cpp).

0

Share this post


Link to post
Share on other sites
Sign in to follow this  
Followers 0