Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
4104545b11
"It was from a different time before books were as jank as they are now. As time has gone on they've only proven to be worse and worse."
20 Zeilen
1.1 KiB
Diff
20 Zeilen
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/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
|
index edc0845ae735a9cf3e0f1a3a2b7eabf726d62744..cdf214fca3b0055efa56702470d9d2f890a8aead 100644
|
|
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
|
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
|
@@ -174,7 +174,7 @@ public class Explosion {
|
|
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
|
|
|
|
if (!this.level.isInWorldBounds(blockposition)) {
|
|
break;
|