mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-16 18:31:53 +01:00
Fix explosions calculation getting stuck (#11061)
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
This commit is contained in:
parent
467c178970
commit
12356fbe77
1 changed files with 1 additions and 2 deletions
|
@ -31176,13 +31176,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
- set.add(blockposition.relative(direction.getOpposite()));
|
||||
+ // Paper end - collision optimisations
|
||||
+ BlockState iblockdata = cachedBlock.blockState; // Paper - optimise collisions
|
||||
+ if (!iblockdata.isDestroyable()) continue; // Paper - Protect Bedrock and End Portal/Frames from being destroyed
|
||||
+ // Paper - collision optimisations
|
||||
+
|
||||
+ // Paper start - collision optimisations
|
||||
+ power -= cachedBlock.resistance;
|
||||
+
|
||||
+ if (power > 0.0f && cachedBlock.shouldExplode == null) {
|
||||
+ if (power > 0.0f && cachedBlock.shouldExplode == null && iblockdata.isDestroyable()) { // Paper - Protect Bedrock and End Portal/Frames from being destroyed
|
||||
+ // note: we expect shouldBlockExplode to be pure with respect to power, as Vanilla currently is.
|
||||
+ // basically, it is unused, which allows us to cache the result
|
||||
+ final boolean shouldExplode = this.damageCalculator.shouldBlockExplode((Explosion)(Object)this, this.level, cachedBlock.immutablePos, cachedBlock.blockState, power);
|
||||
|
|
Loading…
Add table
Reference in a new issue