ClassiCube / MCGalaxy

A Minecraft Classic / ClassiCube server software
GNU General Public License v3.0
172 stars 80 forks source link

Suggested change to lava physics (Burn stuff rather than evaporate it). #614

Open rdebath opened 3 years ago

rdebath commented 3 years ago

Currently if a block is destroyed by Lava it just disappears, if instead it's replaced by a Fire block you get some nice effects. Specifically, things burn UP.

diff --git a/MCGalaxy/Blocks/Physics/LiquidPhysics.cs b/MCGalaxy/Blocks/Physics/LiquidPhysics.cs
index ed4497101..bf8774632 100644
--- a/MCGalaxy/Blocks/Physics/LiquidPhysics.cs
+++ b/MCGalaxy/Blocks/Physics/LiquidPhysics.cs
@@ -95,7 +95,7 @@ namespace MCGalaxy.Blocks.Physics {
                     if (!lvl.Props[block].LavaKills) break;

                     if (lvl.physics > 1 && !lvl.CheckSpongeLava(x, y, z)) {
-                        lvl.AddUpdate(index, Block.Air, default(PhysicsArgs));
+                        lvl.AddUpdate(index, Block.Fire, default(PhysicsArgs));
                     }
                     break;
             }
UnknownShadow200 commented 3 years ago

Apologies for lack of comment

I do agree this suggestion makes burning looks nicer - however it also affects lava survival, so unfortunately I cannot just apply the code change listed here. I'll work on implementing this suggestion though such that lava survival is not affected (and also make LiquidPhysics not depend on LSGame)