Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 11:00:06 +01:00
a207d14a0e
Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>
20 Zeilen
1.2 KiB
Diff
20 Zeilen
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: BrodyBeckwith <brody@beckwith.dev>
|
|
Date: Tue, 14 Jan 2020 17:49:03 -0500
|
|
Subject: [PATCH] Optimize call to getFluid for explosions
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
|
index 45a75f7be308678336e192828becf6cf5c9047bc..667a6d645034c67639c01b8221591877bcb87b35 100644
|
|
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
|
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
|
@@ -151,7 +151,7 @@ public class Explosion {
|
|
for (float f1 = 0.3F; f > 0.0F; f -= 0.22500001F) {
|
|
BlockPos blockposition = new BlockPos(d4, d5, d6);
|
|
BlockState iblockdata = this.level.getBlockState(blockposition);
|
|
- FluidState fluid = this.level.getFluidState(blockposition);
|
|
+ FluidState fluid = iblockdata.getFluidState(); // Paper
|
|
Optional<Float> optional = this.damageCalculator.a(this, this.level, blockposition, iblockdata, fluid);
|
|
|
|
if (optional.isPresent()) {
|