9
0
mirror of https://github.com/Samsuik/Sakura.git synced 2025-12-22 16:29:16 +00:00

Fix lava flowing after being destroyed

This commit is contained in:
Samsuik
2024-10-02 19:47:26 +01:00
parent 021078518d
commit cd2de1f2ce

View File

@@ -20,3 +20,16 @@ index cfeacded13f5ebbc3ef66163387c7a40622d7b74..f39507dd7e0890446c9c16e6ae45d963
}
return this.damageCalculator.getBlockExplosionResistance((Explosion)(Object)this, this.level, pos, blockState, fluidState);
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
index d0109633e8bdf109cfc9178963d7b6cf92f8b189..61d1e3b9033a00da7cccadfcab92f0b211c28b00 100644
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
@@ -195,7 +195,7 @@ public abstract class BlockBehaviour implements FeatureElement {
});
}
- world.setBlock(pos, Blocks.AIR.defaultBlockState(), 3);
+ world.setBlock(pos, Blocks.AIR.defaultBlockState(), world.sakuraConfig().cannons.explosion.explodeLava && state.is(Blocks.LAVA) ? 2 : 3); // Sakura - allow explosions to destroy lava
block.wasExploded(world, pos, explosion);
}
}