Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hi Guys,

 

How can I stop snow settling on a custom block. As I'm rendering it differently it does not look right with the snow on top of it

 

Many thanks,
Xenoamor

Snow settling happens in WorldServer#updateBlocks() - look for the profiler section marked "iceandsnow".  Looking at that code, there are no specific snow-formation events fired, so your options are:

  • Override neighborChanged() in your custom block's class (the method is deprecated, but overriding it is OK).  In the override, you can check if the block above your block has become a snow layer, and if so, remove it.  (note: that's extra block update work, which might become a performance issue if you plan to have a lot of your custom block in the world)
  • Have your custom block emit enough light to prevent snow formation (light level of 10, I believe).  Might not be practical.
  • Enhancement request or PR to Forge to have a custom snow formation event fired.  Not sure if that would fly.

 

Edited by desht

28 minutes ago, V0idWa1k3r said:

As far as I am aware snow doesn't fall on blocks that are not full cubes(return false in Block#isFullCube)

Yes, you're right (although the method to use is Block#getBlockFaceShape, as diesieben07 pointed out).  If it's not SOLID, snow won't settle.

 

Of course, changing that can have other effects (e.g. torch/button placement), so might not be appropriate.

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.