Posted September 26, 20186 yr 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
September 26, 20186 yr 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 September 26, 20186 yr by desht
September 26, 20186 yr As far as I am aware snow doesn't fall on blocks that are not full cubes(return false in Block#isFullCube)
September 26, 20186 yr 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.