2021-06-11 12:02:28 +00: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-01-09 05:12:05 +00:00
|
|
|
index 09f17a7f4f78b09a44a6486923060623478a2b5e..e2bc9e91f03997884af381b3261b102a6e0bc5cb 100644
|
2021-06-11 12:02:28 +00:00
|
|
|
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
2022-01-09 05:12:05 +00:00
|
|
|
@@ -174,7 +174,7 @@ public class Explosion {
|
2021-06-11 12:02:28 +00: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 19:29:58 +00:00
|
|
|
if (!this.level.isInWorldBounds(blockposition)) {
|
|
|
|
break;
|