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.
Terex

Remove snow accumulation limit

38 posts in this topic

I did not find any accumulation limit in the code.The light, heat and rain, causes melting.But nothing prevents it from accumulating.For all I know.

0

Share this post


Link to post
Share on other sites

I don't understand what's going on with the snow if no code limits snow accumulation because it clearly does not accumulate. Anyway, thanks I guess... i wont bring this up again.

0

Share this post


Link to post
Share on other sites

Here is the code.

http://pastebin.com/JXM8GYHg

 

We can increase the rate of appearance of snow.

if(meta < 15 && R.nextInt(20) == 0 && world.getBlock(x, y - 1, z).getMaterial() != Material.leaves)---> R.nextInt(10) == 0

And adjust the rate of disappearance of snow at it's height.

if(meta > 1 && R.nextInt(5) == 0)       world.setBlockMetadataWithNotify(x, y, z, meta - 1, 2);---> R.nextInt( meta ) == 0

(More snow. Less melt.)

0

Share this post


Link to post
Share on other sites

Lipki, you're amazing mate. However, I'm not sure what i can do with that or how to interpret such code. I'm not a programmer.

 

What is the current set height for instance? In vanilla MC, snow layers can only accumulate up to a full block, no more layers stack above that.

 

Basically, what I wish is the rate of accumulation > rate of disappearance than what it's currently set at. Of course, this way the snow may eventually accumulate to the set height everywhere, but that's ok. I simply wish the rate of accumulation were increased such that we get more than 2 layers of snow. 

0

Share this post


Link to post
Share on other sites

The code that lipki copied is simply showing how you can change the rate at which snow accumulates and melts. It has absolutely nothing in it about an accumulation limit.

0

Share this post


Link to post
Share on other sites

The code that lipki copied is simply showing how you can change the rate at which snow accumulates and melts. It has absolutely nothing in it about an accumulation limit.

 

So basically what is going on in the current version of TFC? That can only mean that the rate of melting > rate of accumulation. As soon as 2 layers of snow accumulate, it doesn't take very long to go back to 1 layer aye? This artificial melting when temperature is below freezing and light levels are low is what bothers me since the start of this thread. Sounds like such an easy thing to tweak, but i get it if the devs are not interested.

0

Share this post


Link to post
Share on other sites

So basically what is going on in the current version of TFC? That can only mean that the rate of melting > rate of accumulation. As soon as 2 layers of snow accumulate, it doesn't take very long to go back to 1 layer aye? This artificial melting when temperature is below freezing and light levels are low is what i bothers me since the start of this thread. Sounds like such an easy thing to tweak, but i get it if the devs are not interested.

 

That's the thing. There is no code that is doing an artificial melt for below freezing temperatures and light levels. I've put breakpoints on all of the methods in TFC's snow code for melting, and not a single one of them triggers when I see 2 high snow revert back into 1 high snow in conditions where it doesn't make sense for it to melt.. and yet something else is still melting it, but whatever it is, it is not TFC's code.

1

Share this post


Link to post
Share on other sites

Righto. Well... if it's not in the code then i have nothing else to say ;/ You may close this thread.

0

Share this post


Link to post
Share on other sites

The code that lipki copied is simply showing how you can change the rate at which snow accumulates and melts. It has absolutely nothing in it about an accumulation limit.

We agree....

0

Share this post


Link to post
Share on other sites

That's the thing. There is no code that is doing an artificial melt for below freezing temperatures and light levels. I've put breakpoints on all of the methods in TFC's snow code for melting, and not a single one of them triggers when I see 2 high snow revert back into 1 high snow in conditions where it doesn't make sense for it to melt.. and yet something else is still melting it, but whatever it is, it is not TFC's code.

I think I found the problem: the method canSnowAt() in TFCProvider is returning true even if there is already snow at the given location. So vanilla Minecraft is eventually generating new snow replacing the existing one, no matter how many layers there are - seems like the snow is smelting back to 1 one layer, actually it is being replaced by a new single layer. (this is only for natural snowing, not for placing snow layers)I am testing it - takes time to accumulate snow - and will then create a PR, if successful.
0

Share this post


Link to post
Share on other sites

Thank you!!! I cannot thank you enough (and lipki and Kitty) for spending precious time into this. That description confirms my observations too although i could not have interpreted behaviour this way. Actually, i was going to refer to a minecraft mod called Snowfall. That one works in vanilla mc but would not have solved the problem here.

0

Share this post


Link to post
Share on other sites

Thank you!!! I cannot thank you enough (and lipki and Kitty) for spending precious time into this. That description confirms my observations too although i could not have interpreted behaviour this way. Actually, i was going to refer to a minecraft mod called Snowfall. That one works in vanilla mc but would not have solved the problem here.

but not sure if that is the only problem... the whole snow Behavior is very strange - I understand Bioxx not liking it
1

Share this post


Link to post
Share on other sites

I think I found the problem: the method canSnowAt() in TFCProvider is returning true even if there is already snow at the given location. So vanilla Minecraft is eventually generating new snow replacing the existing one, no matter how many layers there are - seems like the snow is smelting back to 1 one layer, actually it is being replaced by a new single layer. (this is only for natural snowing, not for placing snow layers)I am testing it - takes time to accumulate snow - and will then create a PR, if successful.

Cool :D

I look at your "issue" and I test on my side.

 

edit ------For the little I've tested, it works much better.

1

Share this post


Link to post
Share on other sites