aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0312-Optimize-call-to-getFluid-for-explosions.patch
diff options
context:
space:
mode:
authorRiley Park <[email protected]>2024-05-15 17:06:59 -0700
committerGitHub <[email protected]>2024-05-15 17:06:59 -0700
commitf17519338bc589c045e0b32bfc37e048b23544d5 (patch)
treee50182ec698b4a9de8f366f485ee089b1901bbd9 /patches/server/0312-Optimize-call-to-getFluid-for-explosions.patch
parent3fc93581bb876e8149b2ca423375a98f5ca12d27 (diff)
downloadPaper-f17519338bc589c045e0b32bfc37e048b23544d5.tar.gz
Paper-f17519338bc589c045e0b32bfc37e048b23544d5.zip
Expose server build information (#10729)
* Expose server build information * squash patches * final tweaks --------- Co-authored-by: Jake Potrebic <[email protected]> Co-authored-by: masmc05 <[email protected]>
Diffstat (limited to 'patches/server/0312-Optimize-call-to-getFluid-for-explosions.patch')
-rw-r--r--patches/server/0312-Optimize-call-to-getFluid-for-explosions.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/patches/server/0312-Optimize-call-to-getFluid-for-explosions.patch b/patches/server/0312-Optimize-call-to-getFluid-for-explosions.patch
new file mode 100644
index 0000000000..15594e5ae8
--- /dev/null
+++ b/patches/server/0312-Optimize-call-to-getFluid-for-explosions.patch
@@ -0,0 +1,19 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: BrodyBeckwith <[email protected]>
+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 a24e9c9e80659b5508e3c5ef3fa3d1a26b96b483..f7cb61c85074fc0f79b0b11dcb11e96b93548554 100644
+--- a/src/main/java/net/minecraft/world/level/Explosion.java
++++ b/src/main/java/net/minecraft/world/level/Explosion.java
+@@ -192,7 +192,7 @@ public class Explosion {
+ for (float f1 = 0.3F; f > 0.0F; f -= 0.22500001F) {
+ BlockPos blockposition = BlockPos.containing(d4, d5, d6);
+ BlockState iblockdata = this.level.getBlockState(blockposition);
+- FluidState fluid = this.level.getFluidState(blockposition);
++ FluidState fluid = iblockdata.getFluidState(); // Paper - Perf: Optimize call to getFluid for explosions
+
+ if (!this.level.isInWorldBounds(blockposition)) {
+ break;