Skip to content

Commit

Permalink
Determine lava and water fluid explosion resistance by their block e…
Browse files Browse the repository at this point in the history
…xplosion resistance (#1260)
  • Loading branch information
galacticwarrior9 authored Jan 29, 2023
1 parent cac8a9b commit 789233a
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions patches/server/0293-Configurable-block-blast-resistance.patch
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,32 @@ index 86d765cd40cda9c8b7f4f7898d604ba2fdefa8fd..37360b896edecf3f2e09f0f7da6a37d6
protected final boolean isRandomlyTicking;
protected final SoundType soundType;
protected final float friction;
diff --git a/src/main/java/net/minecraft/world/level/material/LavaFluid.java b/src/main/java/net/minecraft/world/level/material/LavaFluid.java
index 3a04cb4c646c07abf4338c70c865a4c4cb34b1bc..b05b4d3d97bca159c297f150005b5ab5bf6087e0 100644
--- a/src/main/java/net/minecraft/world/level/material/LavaFluid.java
+++ b/src/main/java/net/minecraft/world/level/material/LavaFluid.java
@@ -239,7 +239,7 @@ public abstract class LavaFluid extends FlowingFluid {

@Override
protected float getExplosionResistance() {
- return 100.0F;
+ return Blocks.LAVA.getExplosionResistance(); // Purpur
}

@Override
diff --git a/src/main/java/net/minecraft/world/level/material/WaterFluid.java b/src/main/java/net/minecraft/world/level/material/WaterFluid.java
index ec6c63075306f9e5389e83641d2c8a82369ddc6b..0f16deddd8cbb506ef7886f57ae640a42e841703 100644
--- a/src/main/java/net/minecraft/world/level/material/WaterFluid.java
+++ b/src/main/java/net/minecraft/world/level/material/WaterFluid.java
@@ -116,7 +116,7 @@ public abstract class WaterFluid extends FlowingFluid {

@Override
protected float getExplosionResistance() {
- return 100.0F;
+ return Blocks.WATER.getExplosionResistance(); // Purpur
}

@Override
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index f32daa913a2aaa99fd9a021ee3ace02d7a814277..24fc48aeceb0f00517e5b0e37292749445ba03d7 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
Expand Down

0 comments on commit 789233a

Please sign in to comment.