2020-05-06 11:22:03 +02:00
|
|
|
From b60afe8cf95e5f6ab6881e2a007dd2465b662ae4 Mon Sep 17 00:00:00 2001
|
2020-01-15 01:16:04 +01: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-05-06 11:22:03 +02:00
|
|
|
index d99d2defe99..a353f3d5fa5 100644
|
2020-01-15 01:16:04 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/Explosion.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/Explosion.java
|
|
|
|
@@ -117,7 +117,7 @@ public class Explosion {
|
|
|
|
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
|
|
|
|
|
|
|
|
if (!iblockdata.isAir() || !fluid.isEmpty()) {
|
|
|
|
float f2 = Math.max(iblockdata.getBlock().getDurability(), fluid.k());
|
|
|
|
--
|
2020-05-02 00:03:47 +02:00
|
|
|
2.26.2
|
2020-01-15 01:16:04 +01:00
|
|
|
|