Paper/Spigot-Server-Patches/0398-Optimize-call-to-getFluid-for-explosions.patch
Riley Park 4e958e229f
We're going on an Adventure! (#4842)
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: zml <zml@stellardrift.ca>
Co-authored-by: Mariell Hoversholm <proximyst@proximyst.com>
2021-02-21 20:45:33 +01:00

20 lines
1.1 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/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
index 471b48a52d564cb4989d211188f5c5b561ac7827..a552cc5bebb1a70db2e679a514769d0ad791ad68 100644
--- a/src/main/java/net/minecraft/server/Explosion.java
+++ b/src/main/java/net/minecraft/server/Explosion.java
@@ -125,7 +125,7 @@ public class Explosion {
for (float f1 = 0.3F; f > 0.0F; f -= 0.22500001F) {
BlockPosition blockposition = new BlockPosition(d4, d5, d6);
IBlockData iblockdata = this.world.getType(blockposition);
- Fluid fluid = this.world.getFluid(blockposition);
+ Fluid fluid = iblockdata.getFluid(); // Paper
Optional<Float> optional = this.l.a(this, this.world, blockposition, iblockdata, fluid);
if (optional.isPresent()) {