geforkt von Mirrors/Paper
Fix explosions calculation getting stuck (#11061)
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
Dieser Commit ist enthalten in:
Ursprung
467c178970
Commit
12356fbe77
@ -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);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren