2020-05-06 09:48:49 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2020-01-15 00:16:04 +00:00
|
|
|
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
|
2020-08-25 02:22:08 +00:00
|
|
|
index 7b6c3a667ea67b25f9f12d4049dfc51b1c9fb69d..005ab6dd65b9c50cb07048a69613e425a369b69f 100644
|
2020-01-15 00:16:04 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/Explosion.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/Explosion.java
|
2020-08-25 02:22:08 +00:00
|
|
|
@@ -125,7 +125,7 @@ public class Explosion {
|
2020-01-15 00:16:04 +00:00
|
|
|
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
|
2020-08-25 02:22:08 +00:00
|
|
|
Optional<Float> optional = this.l.a(this, this.world, blockposition, iblockdata, fluid);
|
2020-01-15 00:16:04 +00:00
|
|
|
|
2020-06-25 23:38:24 +00:00
|
|
|
if (optional.isPresent()) {
|