3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 12:30:06 +01:00
Paper/patches/server/0340-Optimize-call-to-getFluid-for-explosions.patch

20 Zeilen
1.1 KiB
Diff

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
2022-12-07 20:22:28 +01:00
index 9f7a35e00b5edca6b2d99d3ed60cde8e1aeac4eb..2dc93845749951cd51a19fd9ee515cebcba5d731 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
2022-12-07 20:22:28 +01:00
@@ -168,7 +168,7 @@ public class Explosion {
2021-06-11 14:02:28 +02:00
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
2021-06-13 21:29:58 +02:00
if (!this.level.isInWorldBounds(blockposition)) {
break;