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

      Server Move   09/13/18

      I (Dries007) have recently taken over as main developer and server admin. This involved moving servers to reduce cost. It's likely there will be some more downtime in the future but most  things should be sorted by now. This forum is in dire need of replacement as the software is quite old and can't be easily updated. If you wish to discuss or stay updated, join our discord: https://invite.gg/terrafirmacraft. The forum will remain available to read, but will be locked in the future, when a new system is setup. The forum and wiki are now ad free. If you'd like to contribute to keeping it that way, you can do so via paypal or patreon.
Next_Gen_Gaming

Better block breaking for ENTIRE trees (yes that means leaves too)

Please read topic below before answering!   13 members have voted

  1. 1. Would this make TFC better?

    • Yes, That would make it soooo much better!
      8
    • Oh hell no!! that's terrible.....
      5

Please sign in or register to vote in this poll.

41 posts in this topic

I tried adding manually directly through the config and it didn't accept it. I will go ask the author to try to add the support

0

Share this post


Link to post
Share on other sites

As far as I know, the only way to implement this would require players to break the bottom trunk block multiple times. There's really no easy way to only break a section of the blocks, and then somehow let the rest of the tree know that on the next tick it should break more blocks. The whole system is basically triggered by a single event, and then the tree scans up, and chops down. There's no way for us to say "Ok hold on a tick or two here before chopping down more blocks" unless we turn trees into ticking tile entities, which would create a fair amount of lag.

Would it be possible then to add a config option that would do that? Limit the number of logs  a axe would break? We could tinker with the value until we find a number that works for the server. It gets a little tiresome to have to ask each new player to first break some leaves before chopping down a sequoia and even then sometimes we still have the crash. Like for example we could choose a number equal to the biggest tree that is not giant, so players would only have to deal with the multiple times when breaking sequoias or Kapok.

1

Share this post


Link to post
Share on other sites

Still one thing doesn't make sense when you use axes it takes a lot of durability from 1 log. I know its supposed to register all the logs on the tree but maybe it can register how many seconds it takes to chop the tree and take that durability?

0

Share this post


Link to post
Share on other sites

Still one thing doesn't make sense when you use axes it takes a lot of durability from 1 log. I know its supposed to register all the logs on the tree but maybe it can register how many seconds it takes to chop the tree and take that durability?

 

I'm not sure what you mean. For balance reasons, the axe takes 1 durability for each log broken. So if the tree is 4 logs tall, the axe takes 4 durability. If the tree is 32 logs tall, the axe takes 32 durability.

0

Share this post


Link to post
Share on other sites

I'm not sure what you mean. For balance reasons, the axe takes 1 durability for each log broken. So if the tree is 4 logs tall, the axe takes 4 durability. If the tree is 32 logs tall, the axe takes 32 durability

Im not sure i was throwing ideas 

0

Share this post


Link to post
Share on other sites

I am having this problem in my server and I would love for a workaround. There is always the new player who did not pay attention on the messages or read the forum and go and Crash the server because they are chopping down Sequoias.

If I could have a config option to limit how many blocks a axe would cut it would solve the problem at least until a better solution was found.

Server crashes are not just annoying, We have players from all time zones and to help keep the server on we have 3 admins that are capable of restarting the server, but sometimes none of then are online and many hours may pass with the server offline. That damage reputation, as a player that finds the server off may never come back.

0

Share this post


Link to post
Share on other sites

I am having this problem in my server and I would love for a workaround. There is always the new player who did not pay attention on the messages or read the forum and go and Crash the server because they are chopping down Sequoias.

If I could have a config option to limit how many blocks a axe would cut it would solve the problem at least until a better solution was found.

Server crashes are not just annoying, We have players from all time zones and to help keep the server on we have 3 admins that are capable of restarting the server, but sometimes none of then are online and many hours may pass with the server offline. That damage reputation, as a player that finds the server off may never come back.

 

If you don't mind me asking, what are the specs of your server? Have you considered setting up the server so that it attempts to auto-restart on it's own without human interaction after a crash?

 

The problem with sequoia trees isn't just how many logs are updating, it's also how many leaf blocks are updating. Even if we added a config and you set it so that the axe only chopped 1 block, it would still update all of the leaf blocks, which from your earlier posts makes it seem is enough to crash your server.

0

Share this post


Link to post
Share on other sites

Right now we are on a shared host, one of those Multicraft servers. The system is a quad core 3.1 GHz  and we have 4GB Ram dedicated to our Minecraft Server, It is rated to up to 80 players for a vanilla minecraft server. I guessed it would be enough for  up to 20 using all the mods.

As far as automatic restart the server is already set to try and restart, but sometimes it is unable to do it and just goes into a loop and we have to shut it down completely and then start again.

Related to the sequoia tree, I must tell that the server does not crash every time someone cuts a Tree, only with the real big ones. That's why I though limiting the logs would work.

Looks like I am not the only one with this problem, although I never had it in single player.

Not a Java coder, but if I understand correctly when you start cutting a tree the game scans the whole tree and the problem happens when it is actually cut and it has to update the logs and the leaves. Does the scan returns the amount of leaves, or just logs? since most leaves are the top of the tree would it be possible to have it counting the logs and if the tree is 200 blocks total ( 4 x 4 trunk it would be 50 blocks tall) it would cut only 20 logs from the top, on the next cut it would increase this number and when is bellow the leaves it can cut everything.

Again we may not need this for long since,we just acquired a dedicated server with 8 GB RAM so we will have much better specs. But it will take time to migrate since the new server comes without a OS so I need to do everything from scratch and Install Linux and all the dependencies for Minecraft Server.

0

Share this post


Link to post
Share on other sites

Not a Java coder, but if I understand correctly when you start cutting a tree the game scans the whole tree and the problem happens when it is actually cut and it has to update the logs and the leaves. Does the scan returns the amount of leaves, or just logs? since most leaves are the top of the tree would it be possible to have it counting the logs and if the tree is 200 blocks total ( 4 x 4 trunk it would be 50 blocks tall) it would cut only 20 logs from the top, on the next cut it would increase this number and when is bellow the leaves it can cut everything.

 

Have you ever updated a single edge leaf block on a sequoia tree before you chop any of the logs? You'll see how it causes a chain reaction that updates all of the leaf blocks on the tree, and a good chunk of them disappear because they aren't within range of a log. Even if you set it to chop only the very top layer of the trunk (4 logs), it is still going to update all of those leaf blocks, there's no way for us to stop that from happening. For some servers, the leaves updating alone is enough to crash the server. There's essentially no way for it to only remove a section of the trunk and only update that section of leaves as well. No matter what, that very first cut, no matter how many logs it removes, is going to cause a lot of block updates, especially on the larger trees, because all the leaf blocks are updating too.

0

Share this post


Link to post
Share on other sites

Thanks kitty, guess will have to quicken the move to the new server.

Once again thanks for the attention and patience explaining code limitations to us.

0

Share this post


Link to post
Share on other sites

I would just like to say, we use the best single core processor (within reason of course) on our TFC server you can get and we still run into the issue of the sequoia crashing the server when chopped down. We do have a restart wrapper so it's definitely back up within 1-2 minutes but is still not too fun to deal with from a players perspective. I did remove all the sequoia leaves in the world which stops it from crashing but the forests look ugly! I'll get my dev to take a look at the code for chopping it down in the near-ish future and post up here what we come up with, if we come up with anything at all. Thank you all for this wonderful information.

0

Share this post


Link to post
Share on other sites

The issue is the large number of blocks updating, the dropped entities are not the primary issue.

0

Share this post


Link to post
Share on other sites

… there's no way for us to stop that from happening. For some servers, the leaves updating alone is enough to crash the server. There's essentially no way for it to only remove a section of the trunk and only update that section of leaves as well. No matter what, that very first cut, no matter how many logs it removes, is going to cause a lot of block updates, especially on the larger trees, because all the leaf blocks are updating too.

Well, that's really a design choice. Vanilla already solved this by allowing leaves to despawn randomly rather than doing a massive neighbor update cascade. I'm not suggesting we go back to the vanilla mechanic, simply objecting to the use of "no way" when talking about a computer program. If we keep talking about it, we might be able to figure something out that doesn't crash everyone's servers.Above, I suggested using a single tile entity at the chop position to handle the log breaking over multiple ticks. Perhaps the same could be used for leaves despawning. The programmers would have to work out the details, but as a rough-out: when the chop occurs, scan for logs that should be removed and store the list in a new tile entity; each tick after, the tile entity removes some logs (say, 16 at a time) without updating neighbors; once the logs are removed, the tile entity starts scanning a sufficient space around the chop for leaves that should be removed, a few layers or something at a time. It might make sense to scan first for remaining logs and place them in a position-keyed hash, or mark their valid leaves in a boolean array, etc., so that each leaf doesn't have to do its own search, repeatedly questioning the same spaces as other leaves nearby already did.
0

Share this post


Link to post
Share on other sites

the tile entity removes some logs (say, 16 at a time) without updating neighbors;

 

This sentence right here is essentially the limitation. As far as I know, there are no good methods available to do this as of Minecraft 1.7. It used to be that you could just change the ID of the block to 0 manually, which didn't cause a block update, but since Minecraft no longer uses number IDs, that isn't an option anymore. Pretty much every standard method available that would remove a block, changing it to an air block, notifies its neighbors of the change, causing a block update.

0

Share this post


Link to post
Share on other sites

But you can change what they do in response to a neighbor change. If they don't do anything, the neighbor change won't cascade.

So what if leaf despawn due to tree chopping was handled by a tile entity, and we re-install random leaf decay to handle other causes (validating logs lost due to fires or explosions, leaves not connected due to weird douglas fir generation, etc.)?

0

Share this post


Link to post
Share on other sites

This tree chopping issue should all be fixed with the new static tree implementation, which is a WIP at the moment .. well, it's already working very nicely, but making all them tree models is very time consuming :wacko:

0

Share this post


Link to post
Share on other sites