2021-06-11 14:02:28 +02:00
|
|
|
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
|
2024-05-16 02:06:59 +02:00
|
|
|
index a24e9c9e80659b5508e3c5ef3fa3d1a26b96b483..f7cb61c85074fc0f79b0b11dcb11e96b93548554 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
2024-04-24 08:05:14 +02:00
|
|
|
@@ -192,7 +192,7 @@ public class Explosion {
|
2021-06-11 14:02:28 +02:00
|
|
|
for (float f1 = 0.3F; f > 0.0F; f -= 0.22500001F) {
|
2023-03-14 20:54:57 +01:00
|
|
|
BlockPos blockposition = BlockPos.containing(d4, d5, d6);
|
2021-06-11 14:02:28 +02:00
|
|
|
BlockState iblockdata = this.level.getBlockState(blockposition);
|
|
|
|
- FluidState fluid = this.level.getFluidState(blockposition);
|
2024-01-21 12:53:04 +01:00
|
|
|
+ FluidState fluid = iblockdata.getFluidState(); // Paper - Perf: Optimize call to getFluid for explosions
|
2021-06-11 14:02:28 +02:00
|
|
|
|
2021-06-13 21:29:58 +02:00
|
|
|
if (!this.level.isInWorldBounds(blockposition)) {
|
|
|
|
break;
|