File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -255,11 +255,12 @@ class LiquidFreeze : public ActiveBlockModifier {
255
255
256
256
float heat = map->getHeat (env, p);
257
257
// heater = rare
258
- if (heat <= -1 && (heat <= -50 || ((myrand_range (-50 , heat)) <= -30 ))) {
258
+ content_t c = map->getNodeNoEx (p - v3s16 (0 , -1 , 0 )).getContent (); // top
259
+ // more chance to freeze if air at top
260
+ if (heat <= -1 && (heat <= -50 || (myrand_range (-50 , heat) <= (c == CONTENT_AIR ? -10 : -40 )))) {
259
261
content_t c_self = n.getContent ();
260
262
// making freeze not annoying, do not freeze random blocks in center of ocean
261
263
// todo: any block not water (dont freeze _source near _flowing)
262
- content_t c;
263
264
bool allow = heat < -40 ;
264
265
// todo: make for(...)
265
266
if (!allow) {
@@ -315,7 +316,8 @@ class LiquidMeltWeather : public ActiveBlockModifier {
315
316
INodeDefManager *ndef = env->getGameDef ()->ndef ();
316
317
317
318
float heat = map->getHeat (env, p);
318
- if (heat >= 1 && (heat >= 40 || ((myrand_range (heat, 40 )) >= 20 ))) {
319
+ content_t c = map->getNodeNoEx (p - v3s16 (0 , -1 , 0 )).getContent (); // top
320
+ if (heat >= 1 && (heat >= 40 || ((myrand_range (heat, 40 )) >= (c == CONTENT_AIR ? 10 : 20 )))) {
319
321
n.freezeMelt (ndef);
320
322
map->addNodeWithEvent (p, n);
321
323
env->getScriptIface ()->node_falling_update (p);
You can’t perform that action at this time.
0 commit comments