mirror of
https://github.com/PaperMC/Paper.git
synced 2025-04-15 08:25:44 +02:00
Optimize call to getFluid for explosions (#2859)
Signed-off-by: BrodyBeckwith <brody@beckwith.dev>
This commit is contained in:
parent
10159aa459
commit
129cb1fbbe
@ -0,0 +1,20 @@
|
||||
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/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
|
||||
index 8762a566..3fd4c12b 100644
|
||||
--- a/src/main/java/net/minecraft/server/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/server/Explosion.java
|
||||
@@ -0,0 +0,0 @@ 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());
|
||||
--
|
Loading…
Reference in New Issue
Block a user