aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0307-Optimize-call-to-getFluid-for-explosions.patch
diff options
context:
space:
mode:
authorNewwind <[email protected]>2024-08-31 19:29:50 +0100
committerGitHub <[email protected]>2024-08-31 20:29:50 +0200
commit509ea2fd17fa03ce04f86046098607733b8767ba (patch)
tree3f7c9a29481fafbb6ad9f846839ec8f4863d2363 /patches/server/0307-Optimize-call-to-getFluid-for-explosions.patch
parente01ddf46279fbb68d157749a906b7a2ecc60da1a (diff)
downloadPaper-509ea2fd17fa03ce04f86046098607733b8767ba.tar.gz
Paper-509ea2fd17fa03ce04f86046098607733b8767ba.zip
Fix horse armor desync (#11341)
Diffstat (limited to 'patches/server/0307-Optimize-call-to-getFluid-for-explosions.patch')
-rw-r--r--patches/server/0307-Optimize-call-to-getFluid-for-explosions.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/patches/server/0307-Optimize-call-to-getFluid-for-explosions.patch b/patches/server/0307-Optimize-call-to-getFluid-for-explosions.patch
new file mode 100644
index 0000000000..4cd45e61ca
--- /dev/null
+++ b/patches/server/0307-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 b216140a8be65e210250358af8daf49344850f20..8bbc5025f202be784db78401154038f1f70f0163 100644
+--- a/src/main/java/net/minecraft/world/level/Explosion.java
++++ b/src/main/java/net/minecraft/world/level/Explosion.java
+@@ -193,7 +193,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;